Skip to content

Commit 85e74eb

Browse files
committed
Add sleep after docker stop to give time before the next step
1 parent 0c9805d commit 85e74eb

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ With docker compose, this would be:
7575

7676
## Use your own certificates
7777

78-
Use volume mounting to substitute the certificate and private key with your own. This example uses the snakeoil cert.
78+
The certificates are at `/app/fullchain.pem` and `/app/privkey.pem`.
79+
80+
You can use volume mounting to substitute the certificate and private key with your own.
7981

8082
my-http-listener:
8183
image: mendhak/http-https-echo:29
@@ -86,7 +88,7 @@ Use volume mounting to substitute the certificate and private key with your own.
8688
- /etc/ssl/certs/ssl-cert-snakeoil.pem:/app/fullchain.pem
8789
- /etc/ssl/private/ssl-cert-snakeoil.key:/app/privkey.pem
8890

89-
`/app/fullchain.pem` and `/app/privkey.pem` paths can be changed - use `HTTPS_CERT_FILE` and `HTTPS_KEY_FILE` environment variables to define location of existing certificate and private key inside container.
91+
You can use the environment variables `HTTPS_CERT_FILE` and `HTTPS_KEY_FILE` to define the location of existing certificate and private key inside container.
9092

9193

9294
## Decode JWT header

‎tests.sh‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ fi
146146

147147
message " Stop containers "
148148
docker stop http-echo-tests
149+
sleep 5
149150

150151
message " Start container with different internal ports "
151152
docker run -d --rm -e HTTP_PORT=8888 -e HTTPS_PORT=9999 --name http-echo-tests -p 8080:8888 -p 8443:9999 -t mendhak/http-https-echo
@@ -179,6 +180,7 @@ fi
179180

180181
message " Stop containers "
181182
docker stop http-echo-tests
183+
sleep 5
182184

183185
message " Start container with empty responses "
184186
docker run -d --rm -e ECHO_BACK_TO_CLIENT=false --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo
@@ -195,6 +197,7 @@ fi
195197

196198
message " Stop containers "
197199
docker stop http-echo-tests
200+
sleep 5
198201

199202
message " Start container with response body only "
200203
docker run -d --rm --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo
@@ -212,6 +215,7 @@ fi
212215

213216
message " Stop containers "
214217
docker stop http-echo-tests
218+
sleep 5
215219

216220
message " Start container with JWT_HEADER "
217221
docker run -d --rm -e JWT_HEADER=Authentication --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo
@@ -231,6 +235,7 @@ fi
231235

232236
message " Stop containers "
233237
docker stop http-echo-tests
238+
sleep 5
234239

235240

236241
message " Start container with LOG_IGNORE_PATH "
@@ -268,6 +273,7 @@ fi
268273

269274
message " Stop containers "
270275
docker stop http-echo-tests
276+
sleep 5
271277

272278
message " Start container with LOG_WITHOUT_NEWLINE "
273279
docker run -d --rm -e LOG_WITHOUT_NEWLINE=1 --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo
@@ -287,6 +293,7 @@ fi
287293

288294
message " Stop containers "
289295
docker stop http-echo-tests
296+
sleep 5
290297

291298
message " Check that container is running as a NON ROOT USER by default"
292299
docker run -d --name http-echo-tests --rm mendhak/http-https-echo
@@ -303,6 +310,7 @@ fi
303310

304311
message " Stop containers "
305312
docker stop http-echo-tests
313+
sleep 5
306314

307315
message " Check that container is running as user different that the user defined in image"
308316
IMAGE_USER="$(docker image inspect mendhak/http-https-echo -f '{{ .ContainerConfig.User }}')"
@@ -323,6 +331,7 @@ fi
323331

324332
message " Stop containers "
325333
docker stop http-echo-tests
334+
sleep 5
326335

327336
message " Check that mTLS server responds with client certificate details"
328337
# Generate a new self signed cert locally
@@ -363,6 +372,7 @@ fi
363372

364373
message " Stop containers "
365374
docker stop http-echo-tests
375+
sleep 5
366376

367377
message " Check that SSL certificate and private key are loaded from custom location"
368378
cert_common_name="server.example.net"
@@ -396,6 +406,7 @@ fi
396406

397407
message " Stop containers "
398408
docker stop http-echo-tests
409+
sleep 5
399410

400411
message " Check that environment variables returned in response if enabled"
401412
docker run -d --rm -e ECHO_INCLUDE_ENV_VARS=1 --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo
@@ -412,6 +423,7 @@ fi
412423

413424
message " Stop containers "
414425
docker stop http-echo-tests
426+
sleep 5
415427

416428
message " Check that environment variables are not present in response by default"
417429
docker run -d --rm --name http-echo-tests -p 8080:8080 -p 8443:8443 -t mendhak/http-https-echo
@@ -428,6 +440,7 @@ fi
428440

429441
message " Stop containers "
430442
docker stop http-echo-tests
443+
sleep 5
431444

432445
popd
433446
rm -rf testarea

0 commit comments

Comments
 (0)