()
| 1052 | } |
| 1053 | |
| 1054 | func (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. |
| 1063 | func (rt *RestTester) WaitForDBOnline() { |