Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-04-22 03:05:04 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-04-22 03:05:04 +0300
commit626417a23a29ee4852a1cc1d267c54f5cb6f399e (patch)
treeb5fffc9f508debdef0236b40e506cfde0303410e /test/acceptance/auth_test.go
parent7250a994989f44c8bc3b83f60cba564cd3c3a74e (diff)
Fix acceptance tests not running on IPv4-only systems
Diffstat (limited to 'test/acceptance/auth_test.go')
-rw-r--r--test/acceptance/auth_test.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/acceptance/auth_test.go b/test/acceptance/auth_test.go
index 1e2ec481..7c444221 100644
--- a/test/acceptance/auth_test.go
+++ b/test/acceptance/auth_test.go
@@ -16,7 +16,7 @@ import (
func TestWhenAuthIsDisabledPrivateIsNotAccessible(t *testing.T) {
skipUnlessEnabled(t)
- teardown := RunPagesProcess(t, *pagesBinary, listeners, "", "")
+ teardown := RunPagesProcess(t, *pagesBinary, SupportedListeners(), "", "")
defer teardown()
rsp, err := GetPageFromListener(t, httpListener, "group.auth.gitlab-example.com", "private.project/")
@@ -28,7 +28,7 @@ func TestWhenAuthIsDisabledPrivateIsNotAccessible(t *testing.T) {
func TestWhenAuthIsEnabledPrivateWillRedirectToAuthorize(t *testing.T) {
skipUnlessEnabled(t)
- teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "")
+ teardown := RunPagesProcessWithAuth(t, *pagesBinary, SupportedListeners(), "")
defer teardown()
rsp, err := GetRedirectPage(t, httpsListener, "group.auth.gitlab-example.com", "private.project/")
@@ -60,7 +60,7 @@ func TestWhenAuthIsEnabledPrivateWillRedirectToAuthorize(t *testing.T) {
func TestWhenAuthDeniedWillCauseUnauthorized(t *testing.T) {
skipUnlessEnabled(t)
- teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "")
+ teardown := RunPagesProcessWithAuth(t, *pagesBinary, SupportedListeners(), "")
defer teardown()
rsp, err := GetPageFromListener(t, httpsListener, "projects.gitlab-example.com", "/auth?error=access_denied")
@@ -72,7 +72,7 @@ func TestWhenAuthDeniedWillCauseUnauthorized(t *testing.T) {
}
func TestWhenLoginCallbackWithWrongStateShouldFail(t *testing.T) {
skipUnlessEnabled(t)
- teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "")
+ teardown := RunPagesProcessWithAuth(t, *pagesBinary, SupportedListeners(), "")
defer teardown()
rsp, err := GetRedirectPage(t, httpsListener, "group.auth.gitlab-example.com", "private.project/")
@@ -91,7 +91,7 @@ func TestWhenLoginCallbackWithWrongStateShouldFail(t *testing.T) {
func TestWhenLoginCallbackWithUnencryptedCode(t *testing.T) {
skipUnlessEnabled(t)
- teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "")
+ teardown := RunPagesProcessWithAuth(t, *pagesBinary, SupportedListeners(), "")
defer teardown()
rsp, err := GetRedirectPage(t, httpsListener, "group.auth.gitlab-example.com", "private.project/")
@@ -187,7 +187,7 @@ func TestAccessControlUnderCustomDomain(t *testing.T) {
testServer.Start()
defer testServer.Close()
- teardown := RunPagesProcessWithAuthServer(t, *pagesBinary, listeners, "", testServer.URL)
+ teardown := RunPagesProcessWithAuthServer(t, *pagesBinary, SupportedListeners(), "", testServer.URL)
defer teardown()
tests := map[string]struct {
@@ -268,7 +268,7 @@ func TestCustomErrorPageWithAuth(t *testing.T) {
testServer.Start()
defer testServer.Close()
- teardown := RunPagesProcessWithAuthServer(t, *pagesBinary, listeners, "", testServer.URL)
+ teardown := RunPagesProcessWithAuthServer(t, *pagesBinary, SupportedListeners(), "", testServer.URL)
defer teardown()
tests := []struct {
@@ -378,7 +378,7 @@ func TestAccessControlUnderCustomDomainWithHTTPSProxy(t *testing.T) {
testServer.Start()
defer testServer.Close()
- teardown := RunPagesProcessWithAuthServer(t, *pagesBinary, listeners, "", testServer.URL)
+ teardown := RunPagesProcessWithAuthServer(t, *pagesBinary, SupportedListeners(), "", testServer.URL)
defer teardown()
rsp, err := GetProxyRedirectPageWithCookie(t, proxyListener, "private.domain.com", "/", "", true)
@@ -441,7 +441,7 @@ func TestAccessControlUnderCustomDomainWithHTTPSProxy(t *testing.T) {
func TestAccessControlGroupDomain404RedirectsAuth(t *testing.T) {
skipUnlessEnabled(t)
- teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "")
+ teardown := RunPagesProcessWithAuth(t, *pagesBinary, SupportedListeners(), "")
defer teardown()
rsp, err := GetRedirectPage(t, httpListener, "group.gitlab-example.com", "/nonexistent/")
@@ -456,7 +456,7 @@ func TestAccessControlGroupDomain404RedirectsAuth(t *testing.T) {
}
func TestAccessControlProject404DoesNotRedirect(t *testing.T) {
skipUnlessEnabled(t)
- teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "")
+ teardown := RunPagesProcessWithAuth(t, *pagesBinary, SupportedListeners(), "")
defer teardown()
rsp, err := GetRedirectPage(t, httpListener, "group.gitlab-example.com", "/project/nonexistent/")
@@ -572,7 +572,7 @@ func testAccessControl(t *testing.T, runPages runPagesFunc) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
- teardown := runPages(t, *pagesBinary, listeners, "", certFile, testServer.URL)
+ teardown := runPages(t, *pagesBinary, SupportedListeners(), "", certFile, testServer.URL)
defer teardown()
rsp, err := GetRedirectPage(t, httpsListener, tt.host, tt.path)
@@ -656,7 +656,7 @@ func TestHijackedCode(t *testing.T) {
testServer.Start()
defer testServer.Close()
- teardown := RunPagesProcessWithAuthServer(t, *pagesBinary, listeners, "", testServer.URL)
+ teardown := RunPagesProcessWithAuthServer(t, *pagesBinary, SupportedListeners(), "", testServer.URL)
defer teardown()
/****ATTACKER******/