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
-t TIMEOUT | --timeout=timeout Timeout in seconds, zero for no timeout
49
49
-- COMMAND ARGS Execute command with args after the test finishes
@@ -69,8 +69,8 @@ Eficode site is up
69
69
To wait for database container to become available:
70
70
71
71
72
-
```
73
-
version: '2'
72
+
```yml
73
+
version: '3'
74
74
75
75
services:
76
76
db:
@@ -83,6 +83,30 @@ services:
83
83
- db
84
84
```
85
85
86
+
To check if [https://www.eficode.com](https://www.eficode.com) is available over HTTPS:
87
+
```
88
+
$ ./wait-for https://www.eficode.com -- echo "Eficode is accessible over HTTPS"
89
+
Eficode is accessible over HTTPS
90
+
```
91
+
92
+
To wait for your API service to become available:
93
+
94
+
95
+
```yml
96
+
version: '3'
97
+
98
+
services:
99
+
api:
100
+
image: nginx
101
+
102
+
tests:
103
+
build: .
104
+
command: sh -c './wait-for http://api -- echo "The api is up! Let's use it"'
105
+
depends_on:
106
+
- api
107
+
108
+
```
109
+
86
110
## Testing
87
111
88
112
Ironically testing is done using [bats](https://github.com/sstephenson/bats), which on the other hand is depending on [bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)).
@@ -100,9 +124,11 @@ Also, please include or update the test cases whenever possible by extending `wa
100
124
101
125
## Note
102
126
103
-
Make sure netcat is installed in your Dockerfile before running the command.
127
+
Make sure netcat is installed in your Dockerfile before running the command if you test over plain TCP.
104
128
```
105
129
RUN apt-get -q update && apt-get -qy install netcat
0 commit comments