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

Method GetDBState

rest/utilities_testing.go:1054–1060  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1052}
1053
1054func (rt *RestTester) GetDBState() string {
1055 var body db.Body
1056 resp := rt.SendAdminRequest("GET", "/{{.db}}/", "")
1057 RequireStatus(rt.TB(), resp, 200)
1058 require.NoError(rt.TB(), base.JSONUnmarshal(resp.Body.Bytes(), &body))
1059 return body["state"].(string)
1060}
1061
1062// WaitForDBOnline waits for the database to be in the Online state. Fail the test harness if the state is not reached within the timeout.
1063func (rt *RestTester) WaitForDBOnline() {

Calls 4

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

Tested by 3