Wait for service in integration tests instead of watching for a string

This commit is contained in:
Daniel Carrillo 2023-03-18 13:01:37 +01:00
parent de78dcdf52
commit 969d17036c
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ func buildContainer() testcontainers.ContainerRequest {
"-enable-secure-headers",
},
ExposedPorts: []string{"8000:8000", "8001:8001"},
WaitingFor: wait.ForLog("Starting TLS server listening on :8001"),
WaitingFor: wait.ForHTTP("/geo").WithTLS(true, &tls.Config{InsecureSkipVerify: true}).WithPort("8001"),
Mounts: testcontainers.Mounts(
testcontainers.BindMount(
filepath.Join(dir, "/../test/GeoIP2-City-Test.mmdb"),