(rt *RestTester)
| 77 | } |
| 78 | |
| 79 | func (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 | |
| 95 | type roleGrant struct { |
| 96 | role string |
no test coverage detected