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

Method CreateTestDoc

rest/utilities_testing_resttester.go:105–109  ·  view source on GitHub ↗

CreateTestDoc creates a document with an arbitrary body.

(docid string)

Source from the content-addressed store, hash-verified

103
104// CreateTestDoc creates a document with an arbitrary body.
105func (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.
112func (rt *RestTester) PutDoc(docID, body string) DocVersion {

Callers 15

TestManualAttachmentFunction · 0.95
TestAddingAttachmentFunction · 0.95
TestTombstoneCountFunction · 0.95
TestDocLifecycleFunction · 0.95
TestFunkyDocIDsFunction · 0.95

Calls 4

SendAdminRequestMethod · 0.95
TBMethod · 0.95
RequireStatusFunction · 0.85

Tested by 15

TestManualAttachmentFunction · 0.76
TestAddingAttachmentFunction · 0.76
TestTombstoneCountFunction · 0.76
TestDocLifecycleFunction · 0.76
TestFunkyDocIDsFunction · 0.76