diff options
author | Tuomo Ala-Vannesluoma <tuomoav@gmail.com> | 2018-09-10 18:49:17 +0300 |
---|---|---|
committer | Tuomo Ala-Vannesluoma <tuomoav@gmail.com> | 2018-09-10 18:49:17 +0300 |
commit | 551ec02c4a7d0d4da3936f0e1fccf6269ac07921 (patch) | |
tree | 0c624714314609056dc68cdf03ea68a9dd283e69 | |
parent | 2ef34395a5106e46009a3261b1c8a8a2a224b032 (diff) |
Move access controlled projects under a group without default domain project
-rw-r--r-- | acceptance_test.go | 18 | ||||
-rw-r--r-- | internal/domain/map_test.go | 1 | ||||
-rw-r--r-- | shared/pages/group.auth/private.project.1/config.json (renamed from shared/pages/group/private.project.1/config.json) | 0 | ||||
-rw-r--r-- | shared/pages/group.auth/private.project.1/public/index.html (renamed from shared/pages/group/private.project.1/public/index.html) | 0 | ||||
-rw-r--r-- | shared/pages/group.auth/private.project.2/config.json (renamed from shared/pages/group/private.project.2/config.json) | 0 | ||||
-rw-r--r-- | shared/pages/group.auth/private.project.2/public/index.html (renamed from shared/pages/group/private.project.2/public/index.html) | 0 | ||||
-rw-r--r-- | shared/pages/group.auth/private.project/config.json (renamed from shared/pages/group/private.project/config.json) | 0 | ||||
-rw-r--r-- | shared/pages/group.auth/private.project/public/index.html (renamed from shared/pages/group/private.project/public/index.html) | 0 |
8 files changed, 10 insertions, 9 deletions
diff --git a/acceptance_test.go b/acceptance_test.go index 23abad5d..19d1c4c9 100644 --- a/acceptance_test.go +++ b/acceptance_test.go @@ -298,7 +298,7 @@ func TestPrometheusMetricsCanBeScraped(t *testing.T) { body, _ := ioutil.ReadAll(resp.Body) assert.Contains(t, string(body), "gitlab_pages_http_sessions_active 0") - assert.Contains(t, string(body), "gitlab_pages_domains_served_total 12") + assert.Contains(t, string(body), "gitlab_pages_domains_served_total 13") } } @@ -581,7 +581,7 @@ func TestWhenAuthIsDisabledPrivateIsNotAccessible(t *testing.T) { teardown := RunPagesProcess(t, *pagesBinary, listeners, "", "") defer teardown() - rsp, err := GetPageFromListener(t, httpListener, "group.gitlab-example.com", "private.project/") + rsp, err := GetPageFromListener(t, httpListener, "group.auth.gitlab-example.com", "private.project/") require.NoError(t, err) rsp.Body.Close() @@ -593,7 +593,7 @@ func TestWhenAuthIsEnabledPrivateWillRedirectToAuthorize(t *testing.T) { teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "") defer teardown() - rsp, err := GetRedirectPage(t, httpsListener, "group.gitlab-example.com", "private.project/") + rsp, err := GetRedirectPage(t, httpsListener, "group.auth.gitlab-example.com", "private.project/") require.NoError(t, err) defer rsp.Body.Close() @@ -635,7 +635,7 @@ func TestWhenLoginCallbackWithWrongStateShouldFail(t *testing.T) { teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "") defer teardown() - rsp, err := GetRedirectPage(t, httpsListener, "group.gitlab-example.com", "private.project/") + rsp, err := GetRedirectPage(t, httpsListener, "group.auth.gitlab-example.com", "private.project/") require.NoError(t, err) defer rsp.Body.Close() @@ -654,7 +654,7 @@ func TestWhenLoginCallbackWithCorrectStateWithoutEndpoint(t *testing.T) { teardown := RunPagesProcessWithAuth(t, *pagesBinary, listeners, "") defer teardown() - rsp, err := GetRedirectPage(t, httpsListener, "group.gitlab-example.com", "private.project/") + rsp, err := GetRedirectPage(t, httpsListener, "group.auth.gitlab-example.com", "private.project/") require.NoError(t, err) defer rsp.Body.Close() @@ -807,28 +807,28 @@ func TestAccessControl(t *testing.T) { Description string }{ { - "group.gitlab-example.com", + "group.auth.gitlab-example.com", "/private.project/", http.StatusOK, false, "project with access", }, { - "group.gitlab-example.com", + "group.auth.gitlab-example.com", "/private.project.1/", http.StatusNotFound, // Do not expose project existed false, "project without access", }, { - "group.gitlab-example.com", + "group.auth.gitlab-example.com", "/private.project.2/", http.StatusFound, true, "invalid token test should redirect back", }, { - "group.gitlab-example.com", + "group.auth.gitlab-example.com", "/nonexistent/", http.StatusNotFound, false, diff --git a/internal/domain/map_test.go b/internal/domain/map_test.go index 88b406bf..31ebc016 100644 --- a/internal/domain/map_test.go +++ b/internal/domain/map_test.go @@ -52,6 +52,7 @@ func TestReadProjects(t *testing.T) { "test2.my-domain.com", "no.cert.com", "private.domain.com", + "group.auth.test.io", } for _, expected := range domains { diff --git a/shared/pages/group/private.project.1/config.json b/shared/pages/group.auth/private.project.1/config.json index dbff776f..dbff776f 100644 --- a/shared/pages/group/private.project.1/config.json +++ b/shared/pages/group.auth/private.project.1/config.json diff --git a/shared/pages/group/private.project.1/public/index.html b/shared/pages/group.auth/private.project.1/public/index.html index c8c6761a..c8c6761a 100644 --- a/shared/pages/group/private.project.1/public/index.html +++ b/shared/pages/group.auth/private.project.1/public/index.html diff --git a/shared/pages/group/private.project.2/config.json b/shared/pages/group.auth/private.project.2/config.json index 6c595219..6c595219 100644 --- a/shared/pages/group/private.project.2/config.json +++ b/shared/pages/group.auth/private.project.2/config.json diff --git a/shared/pages/group/private.project.2/public/index.html b/shared/pages/group.auth/private.project.2/public/index.html index c8c6761a..c8c6761a 100644 --- a/shared/pages/group/private.project.2/public/index.html +++ b/shared/pages/group.auth/private.project.2/public/index.html diff --git a/shared/pages/group/private.project/config.json b/shared/pages/group.auth/private.project/config.json index e7d754a0..e7d754a0 100644 --- a/shared/pages/group/private.project/config.json +++ b/shared/pages/group.auth/private.project/config.json diff --git a/shared/pages/group/private.project/public/index.html b/shared/pages/group.auth/private.project/public/index.html index c8c6761a..c8c6761a 100644 --- a/shared/pages/group/private.project/public/index.html +++ b/shared/pages/group.auth/private.project/public/index.html |