WaitByLabels waits for containers found by list of labels to be ready
(labels map[string]string)
| 3051 | // WaitByLabels waits for containers found by list of labels to be |
| 3052 | // ready |
| 3053 | func (app *DdevApp) WaitByLabels(labels map[string]string) error { |
| 3054 | waitTime := app.GetMaxContainerWaitTime() |
| 3055 | err := dockerutil.ContainersWait(waitTime, labels) |
| 3056 | if err != nil { |
| 3057 | return fmt.Errorf("container(s) failed to become healthy before their configured timeout or in %d seconds.\nThis might be a problem with the healthcheck and not a functional problem.\nThe error was '%v'", waitTime, err.Error()) |
| 3058 | } |
| 3059 | return nil |
| 3060 | } |
| 3061 | |
| 3062 | // StartAndWait is primarily for use in tests. |
| 3063 | // It does app.Start() but then waits for extra seconds |
no test coverage detected