openbao-helm/test/unit/server-serviceaccount.bats
Vincent Desjardins 2852fbba9b annotation configuration on service account (#47)
Signed-off-by: Vincent Desjardins <vdesjardins@gmail.com>
2019-09-06 10:48:12 -04: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" ]
}