WaitForDatabaseState waits for the specified database to be in the specified state. Fails the test harness if the state is not reached within the timeout.
(dbName string, targetState string)
| 1071 | |
| 1072 | // WaitForDatabaseState waits for the specified database to be in the specified state. Fails the test harness if the state is not reached within the timeout. |
| 1073 | func (rt *RestTester) WaitForDatabaseState(dbName string, targetState string) { |
| 1074 | require.EventuallyWithT(rt.TB(), func(c *assert.CollectT) { |
| 1075 | assert.Equal(c, targetState, rt.GetDatabaseRoot(dbName).State) |
| 1076 | }, 10*time.Second, 100*time.Millisecond) |
| 1077 | } |
| 1078 | |
| 1079 | func (rt *RestTester) SendAdminRequestWithHeaders(method, resource string, body string, headers map[string]string) *TestResponse { |
| 1080 | request := Request(method, rt.mustTemplateResource(resource), body) |