public CachingProxyTest()

in CachingProxyTests/src/CachingProxyTest.cs [27:63]


    public CachingProxyTest(ITestOutputHelper output, CachingProxyFixture cachingProxyFixture)
    {
      myOutput = output;
      myTempDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
      Directory.CreateDirectory(myTempDirectory);

      var config = new CachingProxyConfig
      {
        LocalCachePath = myTempDirectory,
        Prefixes =
        [
          "/repo1.maven.org/maven2",
          "/198.51.100.9",
          "/plugins.gradle.org/m2",
          "/unknown_host.xyz",
          $"/real={RealTestServer.Url}"
        ],
        ContentTypeValidationPrefixes =
        [
          "/real"
        ],
        MinimumFreeDiskSpaceMb = 2,
      };

      var builder = new WebHostBuilder()
        .ConfigureServices(services =>
        {
          services.Add(new ServiceDescriptor(typeof(IOptions<CachingProxyConfig>),
            new OptionsWrapper<CachingProxyConfig>(config)));
          Program.ConfigureOurServices(services);
        })
        .Configure(app => { app.UseMiddleware<CachingProxy>(); }
        );

      myServer = new TestServer(builder);
      myRealTestServer = cachingProxyFixture.RealTestServer;
    }