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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-28 13:43:52 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-11-28 13:43:52 +0300
commit18e0901b298d922ebda8295b675ac1df0f4bf77f (patch)
treee32692ef0be2221d4f779d8606f30a6dea025309
parent4ac210acda6408e21a0772c9bb4819f5fb2f4bb6 (diff)
Rename new source test fixture to avoid using existing domain
-rw-r--r--acceptance_test.go4
-rw-r--r--internal/source/domains.go2
-rw-r--r--shared/lookups/new-source-test.gitlab.io.json (renamed from shared/lookups/new-source.test.io.json)2
-rw-r--r--shared/pages/group/new-source-test.gitlab.io/public/index.html1
-rw-r--r--shared/pages/group/new-source.test.io/public/index.html1
5 files changed, 5 insertions, 5 deletions
diff --git a/acceptance_test.go b/acceptance_test.go
index ed114c8a..5faa0e38 100644
--- a/acceptance_test.go
+++ b/acceptance_test.go
@@ -1536,12 +1536,12 @@ func TestGitlabDomainsSource(t *testing.T) {
teardown := RunPagesProcess(t, *pagesBinary, listeners, "", "-gitlab-server", source.URL)
defer teardown()
- response, err := GetPageFromListener(t, httpListener, "new-source.test.io", "/my/pages/project/")
+ response, err := GetPageFromListener(t, httpListener, "new-source-test.gitlab.io", "/my/pages/project/")
require.NoError(t, err)
defer response.Body.Close()
body, _ := ioutil.ReadAll(response.Body)
assert.Equal(t, http.StatusOK, response.StatusCode)
- assert.Equal(t, "New Pages GitLab Source PoC OK\n", string(body))
+ assert.Equal(t, "New Pages GitLab Source TEST OK\n", string(body))
}
diff --git a/internal/source/domains.go b/internal/source/domains.go
index a69387e0..1b847cc9 100644
--- a/internal/source/domains.go
+++ b/internal/source/domains.go
@@ -11,8 +11,8 @@ import (
var newSourceDomains = []string{
"pages-project-poc.gitlab.io",
"pages-namespace-poc.gitlab.io",
+ "new-source-test.gitlab.io", // used also in acceptance tests
"pages-custom-poc.grzegorz.co",
- "new-source.test.io", // used in acceptance tests
}
var brokenSourceDomain = "pages-broken-poc.gitlab.io"
diff --git a/shared/lookups/new-source.test.io.json b/shared/lookups/new-source-test.gitlab.io.json
index 5dfbd9ba..8ff94e78 100644
--- a/shared/lookups/new-source.test.io.json
+++ b/shared/lookups/new-source-test.gitlab.io.json
@@ -1 +1 @@
-{"certificate":"","key":"","lookup_paths":[{"project_id":123,"access_control":false,"https_only":false,"prefix":"/my/pages/project","source":{"type":"file","path":"/group/new-source.test.io/public"}}]}
+{"certificate":"","key":"","lookup_paths":[{"project_id":123,"access_control":false,"https_only":false,"prefix":"/my/pages/project","source":{"type":"file","path":"/group/new-source-test.gitlab.io/public"}}]}
diff --git a/shared/pages/group/new-source-test.gitlab.io/public/index.html b/shared/pages/group/new-source-test.gitlab.io/public/index.html
new file mode 100644
index 00000000..00e11d66
--- /dev/null
+++ b/shared/pages/group/new-source-test.gitlab.io/public/index.html
@@ -0,0 +1 @@
+New Pages GitLab Source TEST OK
diff --git a/shared/pages/group/new-source.test.io/public/index.html b/shared/pages/group/new-source.test.io/public/index.html
deleted file mode 100644
index e6e1e58e..00000000
--- a/shared/pages/group/new-source.test.io/public/index.html
+++ /dev/null
@@ -1 +0,0 @@
-New Pages GitLab Source PoC OK