Skip to content

Commit

Permalink
Merge pull request hashicorp#495 from hashicorp/update-helm-test-to-w…
Browse files Browse the repository at this point in the history
…ork-with-acls

Update helm test to validate successful installation
  • Loading branch information
thisisnotashwin authored Jun 16, 2020
2 parents 42b8065 + ca95ef6 commit b9f36c7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions templates/tests/test-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ spec:
- "/bin/sh"
- "-ec"
- |
export VALUE="{{ .Release.Name }}"
consul kv delete _consul_helm_test
consul kv put _consul_helm_test $VALUE
[ `consul kv get _consul_helm_test` = "$VALUE" ]
consul kv delete _consul_helm_test
consul members | tee members.txt
if [ $(grep -c consul-server members.txt) != $(grep consul-server members.txt | grep -c alive) ]
then
echo "Failed because not all consul servers are available"
exit 1
fi
restartPolicy: Never
{{- end }}

0 comments on commit b9f36c7

Please sign in to comment.