diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2021-01-11 11:42:45 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2021-01-11 11:42:45 +0300 |
commit | 2db62f2094f178315a1d73cc4829caff0cd240ab (patch) | |
tree | d8406ef3100571ff809414bc04762c2fee04ab17 /test/acceptance | |
parent | ad8f7ff5423cde7b5f56d12b8fe592eb9b8193e0 (diff) | |
parent | 67972959d171490e66655fefdc76caf72abba31b (diff) |
Merge branch 'fix-acceptance-test-ports' into 'master'
Disable IPv6 listeners in acceptance tests
Closes #524
See merge request gitlab-org/gitlab-pages!408
Diffstat (limited to 'test/acceptance')
-rw-r--r-- | test/acceptance/acceptance_test.go | 29 | ||||
-rw-r--r-- | test/acceptance/serving_test.go | 3 |
2 files changed, 20 insertions, 12 deletions
diff --git a/test/acceptance/acceptance_test.go b/test/acceptance/acceptance_test.go index 9921076e..ba6528c1 100644 --- a/test/acceptance/acceptance_test.go +++ b/test/acceptance/acceptance_test.go @@ -17,24 +17,31 @@ const ( var ( pagesBinary = flag.String("gitlab-pages-binary", "../../gitlab-pages", "Path to the gitlab-pages binary") + httpPort = "36000" + httpsPort = "37000" + httpProxyPort = "38000" + httpProxyV2Port = "39000" + // TODO: Use TCP port 0 everywhere to avoid conflicts. The binary could output // the actual port (and type of listener) for us to read in place of the // hardcoded values below. listeners = []ListenSpec{ - {"http", "127.0.0.1", "37000"}, - {"http", "::1", "37000"}, - {"https", "127.0.0.1", "37001"}, - {"https", "::1", "37001"}, - {"proxy", "127.0.0.1", "37002"}, - {"proxy", "::1", "37002"}, - {"https-proxyv2", "127.0.0.1", "37003"}, - {"https-proxyv2", "::1", "37003"}, + {"http", "127.0.0.1", httpPort}, + {"https", "127.0.0.1", httpsPort}, + {"proxy", "127.0.0.1", httpProxyPort}, + {"https-proxyv2", "127.0.0.1", httpProxyV2Port}, + // TODO: re-enable IPv6 listeners once https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/12258 is resolved + // https://gitlab.com/gitlab-org/gitlab-pages/-/issues/528 + // {"http", "::1", httpPort}, + // {"https", "::1", httpsPort}, + // {"proxy", "::1", httpProxyPort}, + // {"https-proxyv2", "::1", httpProxyV2Port}, } httpListener = listeners[0] - httpsListener = listeners[2] - proxyListener = listeners[4] - httpsProxyv2Listener = listeners[6] + httpsListener = listeners[1] + proxyListener = listeners[2] + httpsProxyv2Listener = listeners[3] ) func TestMain(m *testing.M) { diff --git a/test/acceptance/serving_test.go b/test/acceptance/serving_test.go index 66b5fa47..becd6b8c 100644 --- a/test/acceptance/serving_test.go +++ b/test/acceptance/serving_test.go @@ -515,7 +515,8 @@ func TestKnownHostInReverseProxySetupReturns200(t *testing.T) { var listeners = []ListenSpec{ {"proxy", "127.0.0.1", "37002"}, - {"proxy", "::1", "37002"}, + // TODO: re-enable https://gitlab.com/gitlab-org/gitlab-pages/-/issues/528 + // {"proxy", "::1", "37002"}, } teardown := RunPagesProcess(t, *pagesBinary, listeners, "") |