Skip to content

Commit b426140

Browse files
committed
New test exit codes
- 254 on TERM, INT or QUIT signal - 253 on failure to launch web service
1 parent c880ac5 commit b426140

File tree

1 file changed

+7
-2
lines changed
  • tests/00-http-docker-swarm

1 file changed

+7
-2
lines changed

tests/00-http-docker-swarm/test

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,14 @@ quit() {
8181
log "Exiting with code $code"
8282
}
8383

84+
term() {
85+
exit 254
86+
}
87+
8488
# Standard setup
8589

86-
trap quit TERM INT EXIT
90+
trap quit EXIT
91+
trap term TERM INT QUIT
8792

8893
h=$(hostname)
8994

@@ -165,7 +170,7 @@ do
165170
replicas=$(docker exec ${NODE}1 docker service ls --format='{{ .Replicas }}' --filter='Name=http')
166171
log "Waiting for remainder of $replicas replicas to launch (#$i) ..."
167172
[ "$replicas" = "$NODES/$NODES" ] && break
168-
[ $i -eq 1 ] && exit 130
173+
[ $i -eq 1 ] && exit 253
169174
sleep 1
170175
done
171176
log "All $NODES replicas launched."

0 commit comments

Comments
 (0)