Skip to content

Commit 13e8c0b

Browse files
committed
chore: parametrize RABBITMQ_START_TIMEOUT in scripts/test
1 parent 4258cd5 commit 13e8c0b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/build_container.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ jobs:
1818
run: scripts/build_container -g scratch -e BASE_IMAGE=scratch
1919

2020
- name: Run test script
21+
env:
22+
RABBITMQ_START_TIMEOUT: 180
2123
run: scripts/test

scripts/test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
#!/bin/bash
1+
#!/bin/bash -x
22

33
set -e
44

55
DIRNAME="$(dirname "$(readlink -f "$0")")"
66

7+
: "${RABBITMQ_START_TIMEOUT:=20}"
8+
79
trap rm_containters EXIT
810

911
rm_containters() {
@@ -26,7 +28,7 @@ echo -e "[\033[34mINFO\033[0m] Wait for rabbitmq listener"
2628
docker run --network=host --rm -q \
2729
--name rdq-busybox \
2830
busybox \
29-
sh -c 'nc -w 20 -z localhost 5672 >/dev/null'
31+
sh -c "nc -w ${RABBITMQ_START_TIMEOUT} -z localhost 5672 >/dev/null"
3032

3133
echo -e "[\033[34mINFO\033[0m] Run tests"
3234
docker run --network=host --rm \

0 commit comments

Comments
 (0)