From df676a47d05b20f7bfe4fdae350f50af15b52905 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 2 Dec 2022 11:39:42 +0800 Subject: Remove session in api tests (#21984) It's no meaning to request an API route with session. --- tests/integration/api_user_search_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/integration/api_user_search_test.go') diff --git a/tests/integration/api_user_search_test.go b/tests/integration/api_user_search_test.go index 58b24d0e1e..dc11281c46 100644 --- a/tests/integration/api_user_search_test.go +++ b/tests/integration/api_user_search_test.go @@ -29,7 +29,7 @@ func TestAPIUserSearchLoggedIn(t *testing.T) { token := getTokenForLoggedInUser(t, session) query := "user2" req := NewRequestf(t, "GET", "/api/v1/users/search?token=%s&q=%s", token, query) - resp := session.MakeRequest(t, req, http.StatusOK) + resp := MakeRequest(t, req, http.StatusOK) var results SearchResults DecodeJSON(t, resp, &results) @@ -69,7 +69,7 @@ func TestAPIUserSearchAdminLoggedInUserHidden(t *testing.T) { query := "user31" req := NewRequestf(t, "GET", "/api/v1/users/search?token=%s&q=%s", token, query) req.SetBasicAuth(token, "x-oauth-basic") - resp := session.MakeRequest(t, req, http.StatusOK) + resp := MakeRequest(t, req, http.StatusOK) var results SearchResults DecodeJSON(t, resp, &results) -- cgit v1.2.3