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:
authorKrasimir Angelov <kangelov@gitlab.com>2019-12-12 10:34:13 +0300
committerKrasimir Angelov <kangelov@gitlab.com>2020-01-10 05:38:30 +0300
commite0ba15e77cfe922ece762f487269cb4e626ca290 (patch)
tree75a135ef0f813b21c2a3490a9ee766725c117ce2 /internal/source/domains_test.go
parent86d619069f226d40d3d0ba97a243db384f133d5f (diff)
Watch a file to configure which domains should use new gitlab source
Instead of passing domains once in an ENV variable we now watcn a config file (specified with `GITLAB_SOURCE_CONFIG_FILE`, defaults to `.gitlab-source-config.yml` and update ednabled/broken domains when it's content change. This way we can control this without having to restart Pages. Related to https://gitlab.com/gitlab-org/gitlab-pages/issues/266.
Diffstat (limited to 'internal/source/domains_test.go')
-rw-r--r--internal/source/domains_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/source/domains_test.go b/internal/source/domains_test.go
index 378f8c89..5fea6ae3 100644
--- a/internal/source/domains_test.go
+++ b/internal/source/domains_test.go
@@ -41,11 +41,11 @@ func TestDomainSources(t *testing.T) {
}
func TestGetDomain(t *testing.T) {
- newSourceDomains = []string{"new-source-test.gitlab.io"}
- brokenSourceDomain = "pages-broken-poc.gitlab.io"
+ gitlabSourceConfig.Domains.Enabled = []string{"new-source-test.gitlab.io"}
+ gitlabSourceConfig.Domains.Broken = "pages-broken-poc.gitlab.io"
t.Run("when requesting a test domain", func(t *testing.T) {
- testDomain := newSourceDomains[0]
+ testDomain := gitlabSourceConfig.Domains.Enabled[0]
newSource := NewMockSource()
newSource.On("GetDomain", testDomain).