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:
authorJaime Martinez <jmartinez@gitlab.com>2021-08-26 03:08:30 +0300
committerJaime Martinez <jmartinez@gitlab.com>2021-08-26 03:08:30 +0300
commit0ef975db7aaa3595ebf56fde4a91351aa0174f11 (patch)
treefffa9bffca13d109d8508a3fa57d3171e0332bf3 /app_test.go
parentc27027696e0745654d38fac79ab3adff12a8f72e (diff)
parent33985bb325b4b21c84d47c644c6d4616b9c3e8ed (diff)
Merge branch 'remove/disk-source' into 'master'
refactor: remove support for disk configuration source Closes #103, #158, #68, and #382 See merge request gitlab-org/gitlab-pages!541
Diffstat (limited to 'app_test.go')
-rw-r--r--app_test.go24
1 files changed, 17 insertions, 7 deletions
diff --git a/app_test.go b/app_test.go
index 48a6013b..483ffb39 100644
--- a/app_test.go
+++ b/app_test.go
@@ -7,6 +7,7 @@ import (
"net/http"
"net/http/httptest"
"testing"
+ "time"
"github.com/stretchr/testify/require"
@@ -79,20 +80,29 @@ func TestHealthCheckMiddleware(t *testing.T) {
{
name: "Healthcheck request",
path: "/-/healthcheck",
- status: http.StatusServiceUnavailable,
- body: "not yet ready\n",
+ status: http.StatusOK,
+ body: "success\n",
},
}
- cfg, err := config.LoadConfig()
- require.NoError(t, err)
- cfg.General.StatusPath = "/-/healthcheck"
+ validCfg := config.GitLab{
+ InternalServer: "server",
+ APISecretKey: []byte("secret"),
+ ClientHTTPTimeout: time.Second,
+ JWTTokenExpiration: time.Second,
+ }
- domains, err := source.NewDomains("auto", &cfg.GitLab)
+ domains, err := source.NewDomains(&validCfg)
require.NoError(t, err)
+ cfg := config.Config{
+ General: config.General{
+ StatusPath: "/-/healthcheck",
+ },
+ }
+
app := theApp{
- config: cfg,
+ config: &cfg,
domains: domains,
}