diff options
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r-- | integrations/integration_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go index 664290cc9d..a1e66ffdfd 100644 --- a/integrations/integration_test.go +++ b/integrations/integration_test.go @@ -256,6 +256,11 @@ func NewRequestWithBody(t testing.TB, method, urlStr string, body io.Reader) *ht return request } +func AddBasicAuthHeader(request *http.Request, username string) *http.Request { + request.SetBasicAuth(username, userPassword) + return request +} + const NoExpectedStatus = -1 func MakeRequest(t testing.TB, req *http.Request, expectedStatus int) *httptest.ResponseRecorder { |