Skip to content

Commit

Permalink
sleep to ensure dashboard/webhook are ready (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobby Brennan authored Aug 14, 2019
1 parent 467ab94 commit 15b1455
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ references:
name: Test Dashboard
command: |
go run main.go --dashboard --dashboard-port 3000 --audit-path ./examples &
sleep 5
sleep 30
curl -f http://localhost:3000 > /dev/null
curl -f http://localhost:3000/health > /dev/null
curl -f http://localhost:3000/favicon.ico > /dev/null
Expand Down
4 changes: 2 additions & 2 deletions test/kube_dashboard_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ kubectl apply -f ./deploy/dashboard.yaml &>/dev/null
check_dashboard_is_ready

kubectl port-forward --namespace polaris svc/polaris-dashboard 3000:80 &
sleep 5
sleep 30
curl -f http://localhost:3000 > /dev/null
curl -f http://localhost:3000/health > /dev/null
curl -f http://localhost:3000/favicon.ico > /dev/null
curl -f http://localhost:3000/static/css/main.css > /dev/null
curl -f http://localhost:3000/results.json > /dev/null
curl -f http://localhost:3000/details/security > /dev/null
curl -f http://localhost:3000/details/security > /dev/null
2 changes: 1 addition & 1 deletion test/webhook_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ kubectl apply -f ./deploy/webhook.yaml &> /dev/null

# wait for the webhook to come online
check_webhook_is_ready

sleep 30

# Webhook started, setting all tests as passed initially.
ALL_TESTS_PASSED=1
Expand Down

0 comments on commit 15b1455

Please sign in to comment.