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:
Diffstat (limited to 'internal/domain/domain_test.go')
-rw-r--r--internal/domain/domain_test.go23
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,