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
path: root/test
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2021-06-17 11:49:54 +0300
committerVladimir Shushlin <vshushlin@gitlab.com>2021-06-17 11:49:54 +0300
commit569d73d925857629c49ed824df5ee1afdf95af76 (patch)
tree49bf05b3444c9dcb319ffab822cf7d95fd262319 /test
parent39c7efd7a9045cfde6ca230e5586d8ae1842ddb0 (diff)
parent26b1dce3b5ad1e58643462d8be9bebd17429cb5e (diff)
Merge branch 'default/json-logging' into 'master'
Default to JSON Logging Closes #223 See merge request gitlab-org/gitlab-pages!489
Diffstat (limited to 'test')
-rw-r--r--test/acceptance/proxyv2_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/acceptance/proxyv2_test.go b/test/acceptance/proxyv2_test.go
index 670f711c..095007ba 100644
--- a/test/acceptance/proxyv2_test.go
+++ b/test/acceptance/proxyv2_test.go
@@ -21,14 +21,14 @@ func TestProxyv2(t *testing.T) {
urlSuffix string
expectedStatusCode int
expectedContent string
- expectedLog string
+ expectedLog []string
}{
"basic_proxyv2_request": {
host: "group.gitlab-example.com",
urlSuffix: "project/",
expectedStatusCode: http.StatusOK,
expectedContent: "project-subdir\n",
- expectedLog: "group.gitlab-example.com 10.1.1.1",
+ expectedLog: []string{"\"host\":\"group.gitlab-example.com\"", "\"remote_ip\":\"10.1.1.1\""},
},
}
@@ -49,7 +49,9 @@ func TestProxyv2(t *testing.T) {
// give the process enough time to write the log message
require.Eventually(t, func() bool {
- require.Contains(t, logBuf.String(), tt.expectedLog, "log mismatch")
+ for _, e := range tt.expectedLog {
+ require.Contains(t, logBuf.String(), e, "log mismatch")
+ }
return true
}, time.Second, time.Millisecond)
})