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 'test/acceptance/serving_test.go')
-rw-r--r--test/acceptance/serving_test.go26
1 files changed, 21 insertions, 5 deletions
diff --git a/test/acceptance/serving_test.go b/test/acceptance/serving_test.go
index 19476830..07dc0345 100644
--- a/test/acceptance/serving_test.go
+++ b/test/acceptance/serving_test.go
@@ -378,10 +378,11 @@ func TestDomainsSource(t *testing.T) {
skipUnlessEnabled(t)
type args struct {
- configSource string
- domain string
- urlSuffix string
- readyCount int
+ configSource string
+ useLegacyStorage bool
+ domain string
+ urlSuffix string
+ readyCount int
}
type want struct {
statusCode int
@@ -481,6 +482,19 @@ func TestDomainsSource(t *testing.T) {
apiCalled: true,
},
},
+ {
+ name: "use_legacy_storage_overrides_domain_source",
+ args: args{
+ useLegacyStorage: true,
+ domain: "test.domain.com",
+ urlSuffix: "/",
+ },
+ want: want{
+ statusCode: http.StatusOK,
+ content: "main-dir\n",
+ apiCalled: false,
+ },
+ },
}
for _, tt := range tests {
@@ -495,7 +509,9 @@ func TestDomainsSource(t *testing.T) {
gitLabAPISecretKey := CreateGitLabAPISecretKeyFixtureFile(t)
- pagesArgs := []string{"-gitlab-server", source.URL, "-api-secret-key", gitLabAPISecretKey, "-domain-config-source", tt.args.configSource}
+ pagesArgs := []string{"-gitlab-server", source.URL, "-api-secret-key", gitLabAPISecretKey, "-domain-config-source", tt.args.configSource,
+ // TODO: remove in https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6009
+ fmt.Sprintf("-use-legacy-storage=%t", tt.args.useLegacyStorage)}
teardown := RunPagesProcessWithEnvs(t, true, *pagesBinary, []ListenSpec{httpListener}, "", []string{}, pagesArgs...)
defer teardown()