You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testcontainers currently supports network access to the underlying host by forwarding to ports specified by Testcontainers.exposeHostPorts. If the container is configured with host access (withHostAccess(true)), then an additional host entry is added with a hostname host.testcontainers.internal and IP address corresponding to the port forwarding container at startup.
We would like the ability to define custom host aliases in addition to the default host.testcontainers.internal option.
Use Case
We are using Testcontainers for integration testing single sign-on login flows in which Selenium browser WebDriver containers interact with the application under test (AUT). In this scenario, the user is redirected to different identity providers based upon the request hostname. Backchannel requests from the AUT to the identity providers are running outside of the Docker network while front channel requests in Selenium run inside the Docker network. This requires a lot of brittle/nasty reverse proxy / DNS server configuration we'd like to avoid. We would prefer not to run the AUT in Docker.
Module
Core
Proposal
Summary
Testcontainers currently supports network access to the underlying host by forwarding to ports specified by
Testcontainers.exposeHostPorts
. If the container is configured with host access (withHostAccess(true)
), then an additional host entry is added with a hostnamehost.testcontainers.internal
and IP address corresponding to the port forwarding container at startup.We would like the ability to define custom host aliases in addition to the default
host.testcontainers.internal
option.Use Case
We are using Testcontainers for integration testing single sign-on login flows in which Selenium browser WebDriver containers interact with the application under test (AUT). In this scenario, the user is redirected to different identity providers based upon the request hostname. Backchannel requests from the AUT to the identity providers are running outside of the Docker network while front channel requests in Selenium run inside the Docker network. This requires a lot of brittle/nasty reverse proxy / DNS server configuration we'd like to avoid. We would prefer not to run the AUT in Docker.
Implementation
PortForwardingContainer.java
Testcontainers.java
GenericContainer.java
Usage
The text was updated successfully, but these errors were encountered: