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:
authorBalasankar "Balu" C <balasankarc@autistici.org>2021-02-17 10:56:11 +0300
committerBalasankar "Balu" C <balasankarc@autistici.org>2021-03-01 08:35:57 +0300
commitb7e2085b76c11212ac41f80672d5c5f9b0287fee (patch)
tree92bb6e221257aeea9da8986c6f1e2a297b9c089c /app_test.go
parent01da18ea5717658eb98f539f921ed02fd35bd3d1 (diff)
Move configuration parsing to Config package
Changelog: changed Signed-off-by: Balasankar "Balu" C <balasankarc@autistici.org>
Diffstat (limited to 'app_test.go')
-rw-r--r--app_test.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/app_test.go b/app_test.go
index f35e90c5..1414623a 100644
--- a/app_test.go
+++ b/app_test.go
@@ -10,6 +10,7 @@ import (
"github.com/stretchr/testify/require"
+ "gitlab.com/gitlab-org/gitlab-pages/internal/config"
"gitlab.com/gitlab-org/gitlab-pages/internal/request"
"gitlab.com/gitlab-org/gitlab-pages/internal/source"
)
@@ -83,14 +84,15 @@ func TestHealthCheckMiddleware(t *testing.T) {
},
}
+ cfg := config.LoadConfig()
+ cfg.General.StatusPath = "/-/healthcheck"
+ cfg.General.DomainConfigurationSource = "auto"
+
app := theApp{
- appConfig: appConfig{
- StatusPath: "/-/healthcheck",
- DomainConfigurationSource: "auto",
- },
+ Config: cfg,
}
- domains, err := source.NewDomains(app.appConfig)
+ domains, err := source.NewDomains(app.Config)
require.NoError(t, err)
app.domains = domains