CreateTestDoc creates a document with an arbitrary body.
(docid string)
| 103 | |
| 104 | // CreateTestDoc creates a document with an arbitrary body. |
| 105 | func (rt *RestTester) CreateTestDoc(docid string) DocVersion { |
| 106 | response := rt.SendAdminRequest(http.MethodPut, fmt.Sprintf("/{{.keyspace}}/%s", docid), `{"prop":true}`) |
| 107 | RequireStatus(rt.TB(), response, 201) |
| 108 | return DocVersionFromPutResponse(rt.TB(), response) |
| 109 | } |
| 110 | |
| 111 | // PutDoc will upsert the document with a given contents. |
| 112 | func (rt *RestTester) PutDoc(docID, body string) DocVersion { |