We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No response
Using a PortBindings for an outbound ip causes an empty mapped port to be returned
func TestOutboundIPPortBinding(t *testing.T) { outboundIP := func() string { conn, err := net.Dial("udp", "8.8.8.8:80") require.NoError(t, err) defer conn.Close() localAddr := conn.LocalAddr().(*net.UDPAddr) return localAddr.IP.String() }() resource, err := pool.RunWithOptions( &dockertest.RunOptions{ Repository: "postgres", Tag: "9.5", Env: []string{"POSTGRES_PASSWORD=secret"}, PortBindings: map[dc.Port][]dc.PortBinding{ "5432/tcp": {{HostIP: outboundIP, HostPort: "0"}}, }, }) require.NoError(t, err) mappedPort := resource.GetPort("5432/tcp") require.NotEmpty(t, mappedPort) boundIP := resource.GetBoundIP("5432/tcp") require.Equal(t, outboundIP, boundIP) require.NoError(t, pool.Purge(resource)) }
latest dockertest
macOS
None
The text was updated successfully, but these errors were encountered:
I have prepared a fix in #533
Sorry, something went wrong.
No branches or pull requests
Preflight checklist
Ory Network Project
No response
Describe the bug
Using a PortBindings for an outbound ip causes an empty mapped port to be returned
Reproducing the bug
Relevant log output
No response
Relevant configuration
No response
Version
latest dockertest
On which operating system are you observing this issue?
macOS
In which environment are you deploying?
None
Additional Context
No response
The text was updated successfully, but these errors were encountered: