diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2023-06-08 09:54:32 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2023-06-08 09:54:32 +0300 |
commit | e64dbc90aec2a9e75e3e8b8141cb25ac0a89554f (patch) | |
tree | ab4c8aea756d110ec1e676ee6088327809803b2e /internal/domain/domain_test.go | |
parent | 5a6388a4479dcfbd522a55b525127f9096e79cdc (diff) | |
parent | 3cbfc605d0ede7e0a79d912fac01d610089f7eef (diff) |
Merge branch '1056-use-pages-root-directory-from-api' into 'master'
Use pages root directory from API
Closes #1056
See merge request https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/859
Merged-by: Jaime Martinez <jmartinez@gitlab.com>
Approved-by: Jaime Martinez <jmartinez@gitlab.com>
Reviewed-by: Kassio Borges <kborges@gitlab.com>
Reviewed-by: Jaime Martinez <jmartinez@gitlab.com>
Reviewed-by: Janis Altherr <jaltherr@gitlab.com>
Co-authored-by: janis <jaltherr@gitlab.com>
Diffstat (limited to 'internal/domain/domain_test.go')
-rw-r--r-- | internal/domain/domain_test.go | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/internal/domain/domain_test.go b/internal/domain/domain_test.go index 3496a6da..5698aead 100644 --- a/internal/domain/domain_test.go +++ b/internal/domain/domain_test.go @@ -36,9 +36,10 @@ func TestIsHTTPSOnly(t *testing.T) { domain: domain.New("custom-domain", "", "", mockResolver(t, &serving.LookupPath{ - Path: "group/project/public", - SHA256: "foo", - IsHTTPSOnly: true, + Path: "group/project/public", + SHA256: "foo", + IsHTTPSOnly: true, + RootDirectory: "public", }, "", nil)), @@ -50,9 +51,10 @@ func TestIsHTTPSOnly(t *testing.T) { domain: domain.New("custom-domain", "", "", mockResolver(t, &serving.LookupPath{ - Path: "group/project/public", - SHA256: "foo", - IsHTTPSOnly: false, + Path: "group/project/public", + SHA256: "foo", + IsHTTPSOnly: false, + RootDirectory: "public", }, "", nil)), @@ -142,8 +144,9 @@ func TestServeNamespaceNotFound(t *testing.T) { path: "/unknown", resolver: mockResolver(t, &serving.LookupPath{ - Path: "group.404/group.404.gitlab-example.com/public", + Path: "group.404/group.404.gitlab-example.com", IsNamespaceProject: true, + RootDirectory: "public", }, "/unknown", nil, @@ -156,9 +159,10 @@ func TestServeNamespaceNotFound(t *testing.T) { path: "/private_project/unknown", resolver: mockResolver(t, &serving.LookupPath{ - Path: "group.404/group.404.gitlab-example.com/public", + Path: "group.404/group.404.gitlab-example.com", IsNamespaceProject: true, HasAccessControl: false, + RootDirectory: "public", }, "/", nil, @@ -171,9 +175,10 @@ func TestServeNamespaceNotFound(t *testing.T) { path: "/unknown", resolver: mockResolver(t, &serving.LookupPath{ - Path: "group.404/group.404.gitlab-example.com/public", + Path: "group.404/group.404.gitlab-example.com", IsNamespaceProject: true, HasAccessControl: true, + RootDirectory: "public", }, "/", nil, |