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:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-05-24 20:41:59 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-05-24 20:42:13 +0300
commit26b1dce3b5ad1e58643462d8be9bebd17429cb5e (patch)
tree4d05ebc2af8ab457ffdd906224ea4e1a3c8babff /test/acceptance/proxyv2_test.go
parent402667fdfff57553ed3e2584aa2efd8010a8bda6 (diff)
Fix proxyv2 acceptance test failing with json logging
Diffstat (limited to 'test/acceptance/proxyv2_test.go')
-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)
})