openbao-helm/test/unit/server-serviceaccount.bats
Michael Golowka OR 1=1); DROP TABLE users; -- c390b3f6df Fix typo: serviceaccount -> serviceAccount (#147)
* Fix typo: serviceaccount -> serviceAccount

* Fix typo in test
2019-12-11 16:04:57 -05:00

29 lines
940 B
Bash
Executable file

#!/usr/bin/env bats
load _helpers
@test "server/ServiceAccount: specify annotations" {
cd `chart_dir`
local actual=$(helm template \
-x templates/server-serviceaccount.yaml \
--set 'server.dev.enabled=true' \
--set 'server.serviceAccount.annotations.foo=bar' \
. | tee /dev/stderr |
yq -r '.metadata.annotations["foo"]' | tee /dev/stderr)
[ "${actual}" = "null" ]
local actual=$(helm template \
-x templates/server-serviceaccount.yaml \
--set 'server.ha.enabled=true' \
--set 'server.serviceAccount.annotations.foo=bar' \
. | tee /dev/stderr |
yq -r '.metadata.annotations["foo"]' | tee /dev/stderr)
[ "${actual}" = "bar" ]
local actual=$(helm template \
-x templates/server-serviceaccount.yaml \
--set 'server.ha.enabled=true' \
. | tee /dev/stderr |
yq -r '.metadata.annotations["foo"]' | tee /dev/stderr)
[ "${actual}" = "null" ]
}