public async Task OpenFrontend_Ok() { GenericContainerResource <FrontEndAppOptions> frontEnd = _composeResource .GetResource <GenericContainerResource <FrontEndAppOptions> >("ui"); var client = new HttpClient { BaseAddress = frontEnd.GetContainerUri() }; HttpResponseMessage frontResponse = await client.GetAsync("/"); frontResponse.StatusCode.Should().Be(HttpStatusCode.OK); }
public async Task InitializeAsync() { Configuration = BuildConfiguration(); Options = Configuration .GetSection("IdentityTests") .Get <IdentityTestOptions>(); var services = new ServiceCollection(); services.AddMagnet() .UseHttp(Options.Magnet.Url) .WithClientName( $"{Options.Magnet.Name}-{Environment.MachineName}"); ServiceProvider = services.BuildServiceProvider(); _magnetClient = ServiceProvider.GetService <MagnetClient>(); Containers = new ComposeResource <IdentityAppOptions>(); await Containers.InitializeAsync(); GenericContainerResource <IdentityHostOptions> host = Containers .GetResource <GenericContainerResource <IdentityHostOptions> >("host"); if (Options.Driver.Mode == SeleniumDriverMode.Remote) { GenericContainerResource <SelemiumFirefoxServerOptions> selenium = Containers .GetResource <GenericContainerResource <SelemiumFirefoxServerOptions> >("selenium"); SeleniumHubUrl = selenium.GetContainerUri().ToString(); HostUrl = host.GetInternalContainerUri().ToString(); } else { HostUrl = host.GetContainerUri().ToString(); } }
public XtraHeadersDelegateHandlerTests( GenericContainerResource <HttpBinWebServerOptions> genericContainer) { _genericContainer = genericContainer; }