Skip to content

Commit acd6a37

Browse files
committed
test(e2e): healtcheck of the local test network now waits until three epochs have elapsed
1 parent 7a522a2 commit acd6a37

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

packages/e2e/local-network/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN apt-get update -y && \
2121
apt-get install -y tzdata ca-certificates jq coreutils
2222

2323
HEALTHCHECK --interval=5s --timeout=1s --retries=120 --start-period=100ms \
24-
CMD test -e /root/network-files/node-spo1/node.sock
24+
CMD /root/scripts/get-epoch.sh | awk '{ if ($0 == "3") exit 0; else exit 1}'
2525

2626
STOPSIGNAL SIGINT
2727
COPY --from=builder /build/bin ./bin
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
here="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)"
6+
root="$(cd "$here/.." && pwd)"
7+
8+
cd "$root"
9+
10+
export PATH=$PWD/bin:$PATH
11+
export CARDANO_NODE_SOCKET_PATH=$PWD/network-files/node-spo1/node.sock
12+
13+
if [ ! -S "$CARDANO_NODE_SOCKET_PATH" ]; then
14+
echo "-1"
15+
else
16+
cardano-cli query tip --testnet-magic 888 | jq .epoch
17+
fi
18+

0 commit comments

Comments
 (0)