-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03e5078
commit e2960d9
Showing
18 changed files
with
314 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
#!/bin/bash | ||
|
||
my_dir="$(dirname "$0")" | ||
source "$my_dir/header.sh" | ||
|
||
testground plan import --from ./plans --name testground | ||
|
||
pushd $TEMPDIR | ||
testground plan import --from plans/placebo | ||
testground run single --runner local:exec --builder exec:go --instances 2 --plan placebo --testcase ok --collect --wait | tee run.out | ||
RUNID=$(awk '/finished run with ID/ { print $9 }' run.out) | ||
echo "checking run $RUNID" | ||
file $RUNID.tgz | ||
LENGTH=${#RUNID} | ||
test $LENGTH -eq 20 | ||
tar -xzvvf $RUNID.tgz | ||
SIZEOUT=$(cat ./"$RUNID"/single/0/run.out | wc -c) | ||
echo "run.out is $SIZEOUT bytes." | ||
SIZEERR=$(cat ./"$RUNID"/single/0/run.err | wc -c) | ||
test $SIZEOUT -gt 0 && test $SIZEERR -eq 0 | ||
|
||
testground run single \ | ||
--plan=testground/placebo \ | ||
--testcase=ok \ | ||
--builder=exec:go \ | ||
--runner=local:exec \ | ||
--instances=2 \ | ||
--collect \ | ||
--wait | tee run.out | ||
|
||
assert_run_output_is_correct run.out | ||
|
||
popd | ||
|
||
echo "terminating remaining containers" | ||
testground terminate --runner local:exec | ||
testground terminate --runner local:exec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,39 @@ | ||
#!/bin/bash | ||
|
||
my_dir="$(dirname "$0")" | ||
source "$my_dir/header.sh" | ||
|
||
testground plan import --from plans/placebo | ||
testground build single --builder docker:go --plan placebo --wait | tee build.out | ||
testground plan import --from ./plans --name testground | ||
|
||
pushd $TEMPDIR | ||
|
||
testground build single \ | ||
--plan testground/placebo \ | ||
--builder docker:go \ | ||
--wait | tee build.out | ||
export ARTIFACT=$(awk -F\" '/generated build artifact/ {print $8}' build.out) | ||
docker tag $ARTIFACT testplan:placebo | ||
|
||
testground healthcheck --runner local:docker --fix | ||
testground run single --runner local:docker --builder docker:go --use-build testplan:placebo --instances 2 --plan placebo --testcase stall --wait & | ||
|
||
testground run single \ | ||
--plan=testground/placebo \ | ||
--testcase=stall \ | ||
--builder=docker:go \ | ||
--use-build=testplan:placebo \ | ||
--runner=local:docker \ | ||
--instances=2 \ | ||
--collect \ | ||
--wait& | ||
|
||
sleep 20 | ||
BEFORE=$(docker ps | grep placebo | wc -l) | ||
testground terminate --runner=local:docker | ||
sleep 10 | ||
AFTER=$(docker ps | grep placebo | wc -l) | ||
test $BEFORE -gt $AFTER | ||
|
||
popd | ||
|
||
echo "terminating remaining containers" | ||
testground terminate --runner local:docker | ||
testground terminate --builder docker:go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.