diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-08-11 02:59:19 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-08-11 03:02:01 +0300 |
commit | 42a77233404804786e5588c4f70762b4fb97e40c (patch) | |
tree | 6a60660591b38e5ab2d702d17268a18d988e917b /test | |
parent | 4a3e74f3a00b63d5ecf70b4ae5d787896a08a340 (diff) |
test: remove unused expectedCredentials (Access-Control-Allow-Credentials) field from cors test
Diffstat (limited to 'test')
-rw-r--r-- | test/acceptance/serving_test.go | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/test/acceptance/serving_test.go b/test/acceptance/serving_test.go index ab169921..eac420d4 100644 --- a/test/acceptance/serving_test.go +++ b/test/acceptance/serving_test.go @@ -229,39 +229,34 @@ func TestCORSAllowsMethod(t *testing.T) { RunPagesProcessWithStubGitLabServer(t) tests := []struct { - name string - method string - expectedStatus int - expectedOrigin string - expectedCredentials string + name string + method string + expectedStatus int + expectedOrigin string }{ { - name: "cors-allows-get", - method: http.MethodGet, - expectedStatus: http.StatusOK, - expectedOrigin: "*", - expectedCredentials: "", + name: "cors-allows-get", + method: http.MethodGet, + expectedStatus: http.StatusOK, + expectedOrigin: "*", }, { - name: "cors-allows-options", - method: http.MethodOptions, - expectedStatus: http.StatusOK, - expectedOrigin: "*", - expectedCredentials: "", + name: "cors-allows-options", + method: http.MethodOptions, + expectedStatus: http.StatusOK, + expectedOrigin: "*", }, { - name: "cors-allows-head", - method: http.MethodHead, - expectedStatus: http.StatusOK, - expectedOrigin: "*", - expectedCredentials: "", + name: "cors-allows-head", + method: http.MethodHead, + expectedStatus: http.StatusOK, + expectedOrigin: "*", }, { - name: "cors-forbids-post", - method: http.MethodPost, - expectedStatus: http.StatusOK, - expectedOrigin: "", - expectedCredentials: "", + name: "cors-forbids-post", + method: http.MethodPost, + expectedStatus: http.StatusOK, + expectedOrigin: "", }, } @@ -272,7 +267,6 @@ func TestCORSAllowsMethod(t *testing.T) { require.Equal(t, tt.expectedStatus, rsp.StatusCode) require.Equal(t, tt.expectedOrigin, rsp.Header.Get("Access-Control-Allow-Origin")) - require.Equal(t, "", rsp.Header.Get("Access-Control-Allow-Credentials")) } }) } |