From 92dcb0833f9bcae2cb47316edbbe28b6e2513e40 Mon Sep 17 00:00:00 2001 From: Dipak Acharya Date: Mon, 31 Aug 2020 17:27:52 +0545 Subject: [PATCH] Wait for services to start in CI ui tests --- .drone.star | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.drone.star b/.drone.star index f6c9683c13..524e96e3e7 100644 --- a/.drone.star +++ b/.drone.star @@ -342,8 +342,16 @@ def UITests(ctx, ocisBranch, ocisCommitId, phoenixBranch, phoenixCommitId): 'mkdir -p /srv/app/tmp/reva', # First run settings service because accounts need it to register the settings bundles '/srv/app/ocis/bin/ocis settings &', + + # Wait for the settings service to start + "while [[ \"$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9190)\" != \"404\" ]]; do sleep 2; done", + # Now start the accounts service 'bin/ocis-accounts server &', + + # Wait for the accounts service to start + "while [[ \"$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9181)\" != \"404\" ]]; do sleep 2; done", + # Now run all the ocis services except the accounts and settings because they are already running '/srv/app/ocis/bin/ocis server', ],