Skip to content

Commit

Permalink
Fail all up test if container build fails
Browse files Browse the repository at this point in the history
Previously we did not fail the all up test if the container build
failed, this could result in some strange behavior where the test
progressed with an old container, giving inaccurate results.
  • Loading branch information
jkilpatr committed Feb 11, 2021
1 parent 261bc47 commit a179b0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/all-up-test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash
set -eux
# the directory of this script, useful for allowing this script
# to be run with any PWD
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

result=$( docker images -q peggy-base )

# builds the container containing various system deps
# also builds Peggy once in order to cache Go deps, this container
# must be rebuilt every time you run this test if you want a faster
Expand All @@ -17,7 +16,9 @@ docker rm -f peggy_all_up_test_instance
set -e

NODES=3
set +u
TEST_TYPE=$1
set -u

# Run new test container instance
docker run --name peggy_all_up_test_instance --cap-add=NET_ADMIN -t peggy-base /bin/bash /peggy/tests/container-scripts/all-up-test-internal.sh $NODES $TEST_TYPE

0 comments on commit a179b0e

Please sign in to comment.