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

Method GetDatabaseRoot

rest/utilities_testing_resttester.go:202–208  ·  view source on GitHub ↗
(dbname string)

Source from the content-addressed store, hash-verified

200}
201
202func (rt *RestTester) GetDatabaseRoot(dbname string) DatabaseRoot {
203 var dbroot DatabaseRoot
204 resp := rt.SendAdminRequest("GET", "/"+dbname+"/", "")
205 RequireStatus(rt.TB(), resp, 200)
206 require.NoError(rt.TB(), base.JSONUnmarshal(resp.BodyBytes(), &dbroot))
207 return dbroot
208}
209
210// WaitForVersion retries a GET for a given document version until it returns 200 or 201 for a given document and revision. If version is not found, the test will fail.
211func (rt *RestTester) WaitForVersion(docID string, version DocVersion) {

Callers 4

WaitForDatabaseStateMethod · 0.95
TestLegacyMetadataIDFunction · 0.80

Calls 5

SendAdminRequestMethod · 0.95
TBMethod · 0.95
JSONUnmarshalFunction · 0.92
RequireStatusFunction · 0.85
BodyBytesMethod · 0.45

Tested by 3

TestLegacyMetadataIDFunction · 0.64