MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / SendAdminRequestWithAuth

Method SendAdminRequestWithAuth

rest/utilities_testing.go:754–763  ·  view source on GitHub ↗
(method, resource string, body string, username string, password string)

Source from the content-addressed store, hash-verified

752}
753
754func (rt *RestTester) SendAdminRequestWithAuth(method, resource string, body string, username string, password string) *TestResponse {
755 request := Request(method, rt.mustTemplateResource(resource), body)
756
757 request.SetBasicAuth(username, password)
758
759 response := &TestResponse{ResponseRecorder: httptest.NewRecorder(), Req: request}
760
761 rt.TestAdminHandler().ServeHTTP(response, request)
762 return response
763}
764
765func (rt *RestTester) Send(request *http.Request) *TestResponse {
766 response := &TestResponse{ResponseRecorder: httptest.NewRecorder(), Req: request}

Callers 15

TestAuditLoggingFieldsFunction · 0.95
TestAdminAPIAuthFunction · 0.95
TestPutDBBytesReadFunction · 0.95
CreateDatabaseMethod · 0.95
CreateUserMethod · 0.95
CreateRoleMethod · 0.95
TestNotExistentDBRequestFunction · 0.95

Calls 3

mustTemplateResourceMethod · 0.95
TestAdminHandlerMethod · 0.95
RequestFunction · 0.85