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

Method request

rest/diagnostic_api_test.go:79–93  ·  view source on GitHub ↗
(rt *RestTester)

Source from the content-addressed store, hash-verified

77}
78
79func (g userGrant) request(rt *RestTester) {
80 payload := g.getUserPayload(rt)
81 rt.TB().Logf("Issuing admin grant: %+v", payload)
82 response := rt.SendAdminRequest(http.MethodPut, "/{{.db}}/_user/"+g.user, payload)
83 if response.Code != http.StatusCreated && response.Code != http.StatusOK {
84 rt.TB().Fatalf("Expected 200 or 201 exit code")
85 }
86 if g.output != "" {
87 if g.docUserTest {
88 compareUserDocSeqsOutput(rt, g.user, g.docIDs, g.output)
89 } else {
90 compareAllChannelsOutput(rt, g.user, g.output)
91 }
92 }
93}
94
95type roleGrant struct {
96 role string

Calls 7

getUserPayloadMethod · 0.95
compareUserDocSeqsOutputFunction · 0.85
compareAllChannelsOutputFunction · 0.85
SendAdminRequestMethod · 0.80
TBMethod · 0.65
LogfMethod · 0.45
FatalfMethod · 0.45

Tested by

no test coverage detected