From 038531fad855c8bc71c9e0e22c7ff82108fb5ac4 Mon Sep 17 00:00:00 2001 From: Brandon Myers Date: Tue, 18 Sep 2018 11:28:29 -0500 Subject: [PATCH] Modify docker_start to wait for resources to boot up --- tools/docker_start.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/docker_start.sh b/tools/docker_start.sh index 2376e0bb..f8fd275e 100644 --- a/tools/docker_start.sh +++ b/tools/docker_start.sh @@ -136,6 +136,8 @@ EOF --secret-keyring ~/.mig/secring.gpg \ --export -a $(whoami)@localhost \ > ~/.mig/$(whoami)-pubkey.asc + # Wait for all the resources to start up + sleep 5 echo -e "create investigator\n$(whoami)\nyes\nyes\nyes\nyes\n$HOME/.mig/$(whoami)-pubkey.asc\ny\n" | \ /go/bin/mig-console -q # Install the newly created pubkey in the agents keychain @@ -172,9 +174,6 @@ EOF # Start integration tests. start_test() { - # Sleep a number of seconds to give the agent time to register before we run the - # test, the heartbeat interval is 30 seconds so 45 should be sufficient - sleep 45 mig -i /go/src/github.com/mozilla/mig/actions/integration_tests.json || exit 1 } @@ -212,6 +211,11 @@ while true; do done sudo service supervisor start +# Sleep a number of seconds to give the agent time to register before we run the +# test, the heartbeat interval is 30 seconds so 45 should be sufficient +echo Sleeping for 45 seconds to give resources some time to bootup +sleep 45 + if [[ $MIGMODE = "test" ]]; then start_test else