diff options
Diffstat (limited to 'test/acceptance')
-rw-r--r-- | test/acceptance/acme_test.go | 4 | ||||
-rw-r--r-- | test/acceptance/artifacts_test.go | 4 | ||||
-rw-r--r-- | test/acceptance/auth_test.go | 10 | ||||
-rw-r--r-- | test/acceptance/config_test.go | 6 | ||||
-rw-r--r-- | test/acceptance/encodings_test.go | 4 | ||||
-rw-r--r-- | test/acceptance/helpers_test.go | 10 | ||||
-rw-r--r-- | test/acceptance/metrics_test.go | 2 | ||||
-rw-r--r-- | test/acceptance/proxyv2_test.go | 2 | ||||
-rw-r--r-- | test/acceptance/redirects_test.go | 6 | ||||
-rw-r--r-- | test/acceptance/serving_test.go | 49 | ||||
-rw-r--r-- | test/acceptance/status_test.go | 4 | ||||
-rw-r--r-- | test/acceptance/tls_test.go | 8 | ||||
-rw-r--r-- | test/acceptance/unknown_http_method_test.go | 2 | ||||
-rw-r--r-- | test/acceptance/zip_test.go | 54 |
14 files changed, 66 insertions, 99 deletions
diff --git a/test/acceptance/acme_test.go b/test/acceptance/acme_test.go index af69ff12..1d6ea4ec 100644 --- a/test/acceptance/acme_test.go +++ b/test/acceptance/acme_test.go @@ -15,7 +15,7 @@ const ( ) func TestAcmeChallengesWhenItIsNotConfigured(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), ) @@ -53,7 +53,7 @@ func TestAcmeChallengesWhenItIsNotConfigured(t *testing.T) { } func TestAcmeChallengesWhenItIsConfigured(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), withExtraArgument("gitlab-server", "https://gitlab-acme.com"), ) diff --git a/test/acceptance/artifacts_test.go b/test/acceptance/artifacts_test.go index 443fedbb..60b18ae3 100644 --- a/test/acceptance/artifacts_test.go +++ b/test/acceptance/artifacts_test.go @@ -134,7 +134,7 @@ func TestArtifactProxyRequest(t *testing.T) { args = append(args, tt.binaryOption) } - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), withArguments(args), withEnv([]string{"SSL_CERT_FILE=" + certFile}), @@ -233,7 +233,7 @@ func TestPrivateArtifactProxyRequest(t *testing.T) { "auth-redirect-uri=https://projects.gitlab-example.com/auth", tt.binaryOption) - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpsListener}), withArguments([]string{ "-config=" + configFile, diff --git a/test/acceptance/auth_test.go b/test/acceptance/auth_test.go index 152030b0..d18c2d77 100644 --- a/test/acceptance/auth_test.go +++ b/test/acceptance/auth_test.go @@ -12,7 +12,7 @@ import ( ) func TestWhenAuthIsDisabledPrivateIsNotAccessible(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), ) @@ -104,7 +104,7 @@ func TestWhenLoginCallbackWithUnencryptedCode(t *testing.T) { require.Equal(t, http.StatusInternalServerError, authrsp.StatusCode) } -func TestAccessControlUnderCustomDomainStandalone(t *testing.T) { +func TestAccessControlUnderCustomDomain(t *testing.T) { runPagesWithAuth(t, []ListenSpec{httpListener}) tests := map[string]struct { @@ -500,11 +500,11 @@ func testAccessControl(t *testing.T, runPages runPagesFunc) { } func TestAccessControlWithSSLCertFile(t *testing.T) { - testAccessControl(t, RunPagesProcessWithGitlabServerWithSSLCertFile) + testAccessControl(t, RunPagesProcessWithSSLCertFile) } func TestAccessControlWithSSLCertDir(t *testing.T) { - testAccessControl(t, RunPagesProcessWithGitlabServerWithSSLCertDir) + testAccessControl(t, RunPagesProcessWithSSLCertDir) } // This proves the fix for https://gitlab.com/gitlab-org/gitlab-pages/-/issues/262 @@ -598,7 +598,7 @@ func runPagesWithAuthAndEnv(t *testing.T, listeners []ListenSpec, env []string) "auth-redirect-uri=https://projects.gitlab-example.com/auth", ) - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners(listeners), withArguments([]string{ "-config=" + configFile, diff --git a/test/acceptance/config_test.go b/test/acceptance/config_test.go index abe0e8ac..82b7fbb1 100644 --- a/test/acceptance/config_test.go +++ b/test/acceptance/config_test.go @@ -13,7 +13,7 @@ import ( func TestEnvironmentVariablesConfig(t *testing.T) { envVarValue := "LISTEN_HTTP=" + net.JoinHostPort(httpListener.Host, httpListener.Port) - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withoutWait, withListeners([]ListenSpec{}), // explicitly disable listeners for this test withEnv([]string{envVarValue}), @@ -30,7 +30,7 @@ func TestEnvironmentVariablesConfig(t *testing.T) { func TestMixedConfigSources(t *testing.T) { envVarValue := "LISTEN_HTTP=" + net.JoinHostPort(httpListener.Host, httpListener.Port) - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withoutWait, withListeners([]ListenSpec{httpsListener}), withEnv([]string{envVarValue}), @@ -50,7 +50,7 @@ func TestMultipleListenersFromEnvironmentVariables(t *testing.T) { listenSpecs := []ListenSpec{{"http", "127.0.0.1", "37001"}, {"http", "127.0.0.1", "37002"}} envVarValue := fmt.Sprintf("LISTEN_HTTP=%s,%s", net.JoinHostPort("127.0.0.1", "37001"), net.JoinHostPort("127.0.0.1", "37002")) - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withoutWait, withListeners([]ListenSpec{}), // explicitly disable listeners for this test withEnv([]string{envVarValue}), diff --git a/test/acceptance/encodings_test.go b/test/acceptance/encodings_test.go index e16306c7..096107dd 100644 --- a/test/acceptance/encodings_test.go +++ b/test/acceptance/encodings_test.go @@ -9,7 +9,7 @@ import ( ) func TestMIMETypes(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), ) @@ -58,7 +58,7 @@ func TestCompressedEncoding(t *testing.T) { }, } - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), ) diff --git a/test/acceptance/helpers_test.go b/test/acceptance/helpers_test.go index 4ea28b2a..c5fd8319 100644 --- a/test/acceptance/helpers_test.go +++ b/test/acceptance/helpers_test.go @@ -202,12 +202,12 @@ func (l ListenSpec) JoinHostPort() string { return net.JoinHostPort(l.Host, l.Port) } -// RunPagesProcess will start a gitlab-pages process with the specified listeners +// RunPagesProcessWithoutGitLabStub will start a gitlab-pages process with the specified listeners // and return a function you can call to shut it down again. Use // GetPageFromProcess to do a HTTP GET against a listener. // // If run as root via sudo, the gitlab-pages process will drop privileges -func RunPagesProcess(t *testing.T, pagesBinary string, listeners []ListenSpec, promPort string, extraArgs ...string) (teardown func()) { +func RunPagesProcessWithoutGitLabStub(t *testing.T, pagesBinary string, listeners []ListenSpec, promPort string, extraArgs ...string) (teardown func()) { _, cleanup := runPagesProcess(t, true, pagesBinary, listeners, promPort, nil, extraArgs...) return cleanup } @@ -217,7 +217,7 @@ func RunPagesProcessWithEnvs(t *testing.T, wait bool, pagesBinary string, listen return cleanup } -func RunPagesProcessWithStubGitLabServer(t *testing.T, opts ...processOption) *LogCaptureBuffer { +func RunPagesProcess(t *testing.T, opts ...processOption) *LogCaptureBuffer { chdir := false chdirCleanup := testhelpers.ChdirInPath(t, "../../shared/pages", &chdir) @@ -256,11 +256,11 @@ func RunPagesProcessWithStubGitLabServer(t *testing.T, opts ...processOption) *L return logBuf } -func RunPagesProcessWithGitlabServerWithSSLCertFile(t *testing.T, listeners []ListenSpec, sslCertFile string) { +func RunPagesProcessWithSSLCertFile(t *testing.T, listeners []ListenSpec, sslCertFile string) { runPagesWithAuthAndEnv(t, listeners, []string{"SSL_CERT_FILE=" + sslCertFile}) } -func RunPagesProcessWithGitlabServerWithSSLCertDir(t *testing.T, listeners []ListenSpec, sslCertFile string) { +func RunPagesProcessWithSSLCertDir(t *testing.T, listeners []ListenSpec, sslCertFile string) { // Create temporary cert dir sslCertDir, err := ioutil.TempDir("", "pages-test-SSL_CERT_DIR") require.NoError(t, err) diff --git a/test/acceptance/metrics_test.go b/test/acceptance/metrics_test.go index 9810d77f..37a3c2b9 100644 --- a/test/acceptance/metrics_test.go +++ b/test/acceptance/metrics_test.go @@ -12,7 +12,7 @@ func TestPrometheusMetricsCanBeScraped(t *testing.T) { _, cleanup := newZipFileServerURL(t, "../../shared/pages/group/zip.gitlab.io/public.zip") defer cleanup() - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withExtraArgument("max-conns", "10"), withExtraArgument("metrics-address", ":42345"), ) diff --git a/test/acceptance/proxyv2_test.go b/test/acceptance/proxyv2_test.go index ebdca6db..8091e8c6 100644 --- a/test/acceptance/proxyv2_test.go +++ b/test/acceptance/proxyv2_test.go @@ -10,7 +10,7 @@ import ( ) func TestProxyv2(t *testing.T) { - logBuf := RunPagesProcessWithStubGitLabServer(t, + logBuf := RunPagesProcess(t, withListeners([]ListenSpec{httpsProxyv2Listener}), ) diff --git a/test/acceptance/redirects_test.go b/test/acceptance/redirects_test.go index c7feafca..f2748789 100644 --- a/test/acceptance/redirects_test.go +++ b/test/acceptance/redirects_test.go @@ -10,7 +10,7 @@ import ( ) func TestDisabledRedirects(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), withEnv([]string{"FF_ENABLE_REDIRECTS=false"}), ) @@ -31,7 +31,7 @@ func TestDisabledRedirects(t *testing.T) { } func TestRedirectStatusPage(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), ) @@ -47,7 +47,7 @@ func TestRedirectStatusPage(t *testing.T) { } func TestRedirect(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), ) diff --git a/test/acceptance/serving_test.go b/test/acceptance/serving_test.go index eac420d4..fb73e03e 100644 --- a/test/acceptance/serving_test.go +++ b/test/acceptance/serving_test.go @@ -14,7 +14,7 @@ import ( ) func TestUnknownHostReturnsNotFound(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t) for _, spec := range supportedListeners() { rsp, err := GetPageFromListener(t, spec, "invalid.invalid", "") @@ -26,7 +26,7 @@ func TestUnknownHostReturnsNotFound(t *testing.T) { } func TestUnknownProjectReturnsNotFound(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t) rsp, err := GetPageFromListener(t, httpListener, "group.gitlab-example.com", "/nonexistent/") require.NoError(t, err) @@ -35,7 +35,7 @@ func TestUnknownProjectReturnsNotFound(t *testing.T) { } func TestGroupDomainReturns200(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t) rsp, err := GetPageFromListener(t, httpListener, "group.gitlab-example.com", "/") require.NoError(t, err) @@ -49,7 +49,7 @@ func TestGroupDomainReturns200(t *testing.T) { } func TestKnownHostReturns200(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t) tests := []struct { name string @@ -131,7 +131,7 @@ func TestNestedSubgroups(t *testing.T) { makeProjectIndex(subGroupPath) } - teardown := RunPagesProcess(t, *pagesBinary, supportedListeners(), "", "-pages-root", pagesRoot) + teardown := RunPagesProcessWithoutGitLabStub(t, *pagesBinary, supportedListeners(), "", "-pages-root", pagesRoot) defer teardown() for nestingLevel, path := range paths { @@ -152,7 +152,7 @@ func TestNestedSubgroups(t *testing.T) { } func TestCustom404(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t) tests := []struct { host string @@ -212,7 +212,7 @@ func TestCustom404(t *testing.T) { } func TestCORSWhenDisabled(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, withExtraArgument("disable-cross-origin-requests", "true")) + RunPagesProcess(t, withExtraArgument("disable-cross-origin-requests", "true")) for _, spec := range supportedListeners() { for _, method := range []string{http.MethodGet, http.MethodHead, http.MethodOptions} { @@ -226,7 +226,7 @@ func TestCORSWhenDisabled(t *testing.T) { } func TestCORSAllowsMethod(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t) tests := []struct { name string @@ -273,7 +273,7 @@ func TestCORSAllowsMethod(t *testing.T) { } func TestCustomHeaders(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withExtraArgument("header", "X-Test1:Testing1"), withExtraArgument("header", "X-Test2:Testing2"), ) @@ -288,7 +288,7 @@ func TestCustomHeaders(t *testing.T) { } func TestKnownHostWithPortReturns200(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t) for _, spec := range supportedListeners() { rsp, err := GetPageFromListener(t, spec, "group.gitlab-example.com:"+spec.Port, "project/") @@ -300,7 +300,7 @@ func TestKnownHostWithPortReturns200(t *testing.T) { } func TestHttpToHttpsRedirectDisabled(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t) rsp, err := GetRedirectPage(t, httpListener, "group.gitlab-example.com", "project/") require.NoError(t, err) @@ -314,7 +314,7 @@ func TestHttpToHttpsRedirectDisabled(t *testing.T) { } func TestHttpToHttpsRedirectEnabled(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, withExtraArgument("redirect-http", "true")) + RunPagesProcess(t, withExtraArgument("redirect-http", "true")) rsp, err := GetRedirectPage(t, httpListener, "group.gitlab-example.com", "project/") require.NoError(t, err) @@ -330,7 +330,7 @@ func TestHttpToHttpsRedirectEnabled(t *testing.T) { } func TestHTTPSRedirect(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), ) @@ -563,7 +563,9 @@ func TestGitLabSourceBecomesUnauthorized(t *testing.T) { } func TestKnownHostInReverseProxySetupReturns200(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t, + withListeners([]ListenSpec{proxyListener}), + ) rsp, err := GetProxiedPageFromListener(t, proxyListener, "127.0.0.1", "group.gitlab-example.com", "project/") @@ -612,18 +614,17 @@ func TestDomainResolverError(t *testing.T) { w.WriteHeader(test.status) } - source := NewGitlabDomainsSourceStub(t, opts) - defer source.Close() - gitLabAPISecretKey := CreateGitLabAPISecretKeyFixtureFile(t) - - pagesArgs := []string{"-gitlab-server", source.URL, "-api-secret-key", gitLabAPISecretKey, "-domain-config-source", "gitlab"} + var pagesArgs []string if test.timeout != 0 { pagesArgs = append(pagesArgs, "-gitlab-client-http-timeout", test.timeout.String(), "-gitlab-retrieval-timeout", "200ms", "-gitlab-retrieval-interval", "200ms", "-gitlab-retrieval-retries", "1") } - teardown := RunPagesProcessWithEnvs(t, true, *pagesBinary, supportedListeners(), "", []string{}, pagesArgs...) - defer teardown() + RunPagesProcess(t, + withListeners([]ListenSpec{httpListener}), + withStubOptions(opts), + withArguments(pagesArgs), + ) response, err := GetPageFromListener(t, httpListener, domainName, "/my/pages/project/") require.NoError(t, err) @@ -665,7 +666,7 @@ func doCrossOriginRequest(t *testing.T, spec ListenSpec, method, reqMethod, url } func TestQueryStringPersistedInSlashRewrite(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t) + RunPagesProcess(t) rsp, err := GetRedirectPage(t, httpsListener, "group.gitlab-example.com", "project?q=test") require.NoError(t, err) @@ -699,7 +700,7 @@ func TestServerRepliesWithHeaders(t *testing.T) { for name, test := range tests { testFn := func(envArgs, headerArgs []string) func(*testing.T) { return func(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), withEnv(envArgs), withArguments(headerArgs), @@ -746,7 +747,7 @@ func TestServerRepliesWithHeaders(t *testing.T) { } func TestDiskDisabledFailsToServeFileAndLocalContent(t *testing.T) { - logBuf := RunPagesProcessWithStubGitLabServer(t, + logBuf := RunPagesProcess(t, withExtraArgument("enable-disk", "false"), ) diff --git a/test/acceptance/status_test.go b/test/acceptance/status_test.go index 6fb2efe0..59e7bc17 100644 --- a/test/acceptance/status_test.go +++ b/test/acceptance/status_test.go @@ -9,7 +9,7 @@ import ( ) func TestStatusPage(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), withExtraArgument("pages-status", "/@statuscheck"), ) @@ -23,7 +23,7 @@ func TestStatusPage(t *testing.T) { func TestStatusNotYetReady(t *testing.T) { listeners := supportedListeners() - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withoutWait, withExtraArgument("pages-status", "/@statuscheck"), withExtraArgument("pages-root", "../../shared/invalid-pages"), diff --git a/test/acceptance/tls_test.go b/test/acceptance/tls_test.go index 17e5263d..3b4c3a5c 100644 --- a/test/acceptance/tls_test.go +++ b/test/acceptance/tls_test.go @@ -8,7 +8,7 @@ import ( ) func TestAcceptsSupportedCiphers(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpsListener}), ) @@ -44,7 +44,7 @@ func tlsConfigWithInsecureCiphersOnly() *tls.Config { } func TestRejectsUnsupportedCiphers(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpsListener}), ) @@ -57,7 +57,7 @@ func TestRejectsUnsupportedCiphers(t *testing.T) { } func TestEnableInsecureCiphers(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpsListener}), withExtraArgument("-insecure-ciphers", "true"), ) @@ -94,7 +94,7 @@ func TestTLSVersions(t *testing.T) { args = append(args, "-tls-max-version", tc.tlsMax) } - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpsListener}), withArguments(args), ) diff --git a/test/acceptance/unknown_http_method_test.go b/test/acceptance/unknown_http_method_test.go index c06dbed8..87422292 100644 --- a/test/acceptance/unknown_http_method_test.go +++ b/test/acceptance/unknown_http_method_test.go @@ -8,7 +8,7 @@ import ( ) func TestUnknownHTTPMethod(t *testing.T) { - RunPagesProcessWithStubGitLabServer(t, + RunPagesProcess(t, withListeners([]ListenSpec{httpListener}), ) diff --git a/test/acceptance/zip_test.go b/test/acceptance/zip_test.go index 09e69051..3bdd1c49 100644 --- a/test/acceptance/zip_test.go +++ b/test/acceptance/zip_test.go @@ -5,26 +5,18 @@ import ( "net" "net/http" "net/http/httptest" - "os" "testing" "github.com/stretchr/testify/require" - - "gitlab.com/gitlab-org/gitlab-pages/internal/testhelpers" ) func TestZipServing(t *testing.T) { _, cleanup := newZipFileServerURL(t, "../../shared/pages/group/zip.gitlab.io/public.zip") defer cleanup() - source := NewGitlabDomainsSourceStub(t, &stubOpts{}) - defer source.Close() - - gitLabAPISecretKey := CreateGitLabAPISecretKeyFixtureFile(t) - - pagesArgs := []string{"-gitlab-server", source.URL, "-api-secret-key", gitLabAPISecretKey, "-domain-config-source", "gitlab"} - teardown := RunPagesProcessWithEnvs(t, true, *pagesBinary, supportedListeners(), "", []string{}, pagesArgs...) - defer teardown() + RunPagesProcess(t, + withListeners([]ListenSpec{httpListener}), + ) tests := map[string]struct { host string @@ -105,26 +97,9 @@ func TestZipServing(t *testing.T) { } func TestZipServingFromDisk(t *testing.T) { - chdir := false - defer testhelpers.ChdirInPath(t, "../../shared/pages", &chdir)() - - _, cleanup := newZipFileServerURL(t, "shared/pages/group/zip.gitlab.io/public.zip") - defer cleanup() - - wd, err := os.Getwd() - require.NoError(t, err) - - source := NewGitlabDomainsSourceStub(t, &stubOpts{ - pagesRoot: wd, - }) - - defer source.Close() - - gitLabAPISecretKey := CreateGitLabAPISecretKeyFixtureFile(t) - - pagesArgs := []string{"-gitlab-server", source.URL, "-api-secret-key", gitLabAPISecretKey, "-domain-config-source", "gitlab", "-pages-root", wd} - teardown := RunPagesProcessWithEnvs(t, true, *pagesBinary, supportedListeners(), "", []string{}, pagesArgs...) - defer teardown() + RunPagesProcess(t, + withListeners([]ListenSpec{httpListener}), + ) tests := map[string]struct { host string @@ -205,19 +180,10 @@ func TestZipServingFromDisk(t *testing.T) { } func TestZipServingConfigShortTimeout(t *testing.T) { - source := NewGitlabDomainsSourceStub(t, &stubOpts{}) - defer source.Close() - - gitLabAPISecretKey := CreateGitLabAPISecretKeyFixtureFile(t) - - pagesArgs := []string{"-gitlab-server", source.URL, "-api-secret-key", gitLabAPISecretKey, "-domain-config-source", "gitlab", - "-zip-open-timeout=1ns"} // <- test purpose - - teardown := RunPagesProcessWithEnvs(t, true, *pagesBinary, supportedListeners(), "", []string{}, pagesArgs...) - defer teardown() - - _, cleanup := newZipFileServerURL(t, "../../shared/pages/group/zip.gitlab.io/public.zip") - defer cleanup() + RunPagesProcess(t, + withListeners([]ListenSpec{httpListener}), + withExtraArgument("zip-open-timeout", "1ns"), + ) response, err := GetPageFromListener(t, httpListener, "zip.gitlab.io", "/") require.NoError(t, err) |