| 200 | } |
| 201 | |
| 202 | func (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. |
| 211 | func (rt *RestTester) WaitForVersion(docID string, version DocVersion) { |