You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/features/wait_strategies.md
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,17 @@ enum with the following variants:
14
14
*`Healthcheck` - wait for the container to be healthy
15
15
*`Http` - wait for an HTTP(S) response with predefined conditions (see [`HttpWaitStrategy`](https://docs.rs/testcontainers/latest/testcontainers/core/wait/struct.HttpWaitStrategy.html) for more details)
16
16
*`Duration` - wait for a specific duration. Usually less preferable and better to combine with other strategies.
17
-
*`SuccessfulCommand` - wait for a given command to exit successfully (exit code 0).
17
+
*`Command` - wait for a given command to exit successfully (exit code 0).
18
+
19
+
## Waiting for a command
20
+
21
+
You can wait for a specific command on an image with a specific error code if you wish. For example, let's wait for a Testcontainer with a Postgres image to be ready by checking for the successful exit code `0` of `pg_isready`:
0 commit comments