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
-s | --strictOnly execute subcommand if the test succeeds
14
+
-l | --loose Execute subcommand even if the test times out
15
15
-t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout
16
16
-- COMMAND ARGS Execute command with args after the test finishes
17
17
```
@@ -22,18 +22,17 @@ To check if [eficode.com](https://eficode.com) is available:
22
22
23
23
```
24
24
$ ./wait-for www.eficode.com:80 -- echo "Eficode site is up"
25
-
26
-
Connection to www.eficode.com port 80 [tcp/http] succeeded!
27
25
Eficode site is up
28
26
```
29
27
30
28
The subcommand will be executed regardless if the service is up or not. If you wish to execute the subcommand only if the service is up, add the --strict argument. In this example, we will test port 81 on www.google.com which will fail:
31
29
32
30
```
33
-
$ ./wait-for www.eficode.com:80 -- echo "Eficode site is up"
34
-
$ ./wait-for www.google.com:81 --timeout=1 --strict -- echo "google is up"
31
+
$ ./wait-for www.google.com:81 --timeout=1 -- echo "google is up"
32
+
Operation timed out
33
+
$ ./wait-for www.google.com:81 --timeout=1 --loose -- echo "waited for google"
35
34
Operation timed out
36
-
google is up
35
+
waited for google
37
36
```
38
37
39
38
To wait for database container to become available:
0 commit comments