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 'app_test.go')
-rw-r--r--app_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/app_test.go b/app_test.go
index 48a6013b..669d041e 100644
--- a/app_test.go
+++ b/app_test.go
@@ -6,6 +6,7 @@ import (
"io"
"net/http"
"net/http/httptest"
+ "os"
"testing"
"github.com/stretchr/testify/require"
@@ -84,6 +85,12 @@ func TestHealthCheckMiddleware(t *testing.T) {
},
}
+ // required by LoadConfig
+ require.NoError(t, os.Setenv("LISTEN_HTTP", ":0"))
+ t.Cleanup(func() {
+ require.NoError(t, os.Unsetenv("LISTEN_HTTP"))
+ })
+
cfg, err := config.LoadConfig()
require.NoError(t, err)
cfg.General.StatusPath = "/-/healthcheck"