diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2021-07-19 09:26:17 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2021-07-19 09:26:17 +0300 |
commit | 6cd6c1834228104f3d21dac838aa4a0edd54e874 (patch) | |
tree | 8974bf5104ba787412f1ca0783eaec02aa6809bb /test | |
parent | e3ae6279faffc6005de53ec1c2a0fa15da706d22 (diff) |
Update statut tests
Diffstat (limited to 'test')
-rw-r--r-- | test/acceptance/status_test.go | 8 | ||||
-rw-r--r-- | test/acceptance/unknown_http_method_test.go | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/test/acceptance/status_test.go b/test/acceptance/status_test.go index a241da1f..6fb2efe0 100644 --- a/test/acceptance/status_test.go +++ b/test/acceptance/status_test.go @@ -21,6 +21,8 @@ func TestStatusPage(t *testing.T) { } func TestStatusNotYetReady(t *testing.T) { + listeners := supportedListeners() + RunPagesProcessWithStubGitLabServer(t, withoutWait, withExtraArgument("pages-status", "/@statuscheck"), @@ -30,8 +32,10 @@ func TestStatusNotYetReady(t *testing.T) { }), ) - waitForRoundtrips(t, supportedListeners(), 5*time.Second) - for _, spec := range supportedListeners() { + waitForRoundtrips(t, listeners, time.Duration(len(listeners))*time.Second) + + // test status on all supported listeners + for _, spec := range listeners { rsp, err := GetPageFromListener(t, spec, "group.gitlab-example.com", "@statuscheck") require.NoError(t, err) defer rsp.Body.Close() diff --git a/test/acceptance/unknown_http_method_test.go b/test/acceptance/unknown_http_method_test.go index ffa07153..c06dbed8 100644 --- a/test/acceptance/unknown_http_method_test.go +++ b/test/acceptance/unknown_http_method_test.go @@ -8,8 +8,9 @@ import ( ) func TestUnknownHTTPMethod(t *testing.T) { - teardown := RunPagesProcess(t, *pagesBinary, supportedListeners(), "") - defer teardown() + RunPagesProcessWithStubGitLabServer(t, + withListeners([]ListenSpec{httpListener}), + ) req, err := http.NewRequest("UNKNOWN", httpListener.URL(""), nil) require.NoError(t, err) |