openbao-helm/test/unit/injector-clusterrolebinding.bats
Theron Voran 77b973c17f
Helm 3 support (#195)
Update chart and tests to Helm 3

Co-authored-by: Matt Piekunka <mpiekunk@users.noreply.github.com>
Co-authored-by: Mike Brancato <mbrancato@users.noreply.github.com>
2020-02-06 08:44:38 -08:00

22 lines
641 B
Bash
Executable file

#!/usr/bin/env bats
load _helpers
@test "injector/ClusterRoleBinding: enabled by default" {
cd `chart_dir`
local actual=$(helm template \
--show-only templates/injector-clusterrolebinding.yaml \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "true" ]
}
@test "injector/ClusterRoleBinding: disable with global.enabled" {
cd `chart_dir`
local actual=$( (helm template \
--show-only templates/injector-clusterrolebinding.yaml \
--set 'global.enabled=false' \
. || echo "---") | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "false" ]
}