openbao-helm/test/unit/connect-inject-mutatingwebhook.yaml

44 lines
1.3 KiB
YAML
Raw Normal View History

2018-09-03 16:34:28 +00:00
#!/usr/bin/env bats
load _helpers
@test "connectInject/MutatingWebhookConfiguration: disabled by default" {
2018-09-03 16:34:28 +00:00
cd `chart_dir`
local actual=$(helm template \
-x templates/connect-inject-mutatingwebhook.yaml \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "false" ]
2018-09-03 16:34:28 +00:00
}
@test "connectInject/MutatingWebhookConfiguration: enable with global.enabled false" {
cd `chart_dir`
local actual=$(helm template \
-x templates/connect-inject-mutatingwebhook.yaml \
--set 'global.enabled=false' \
--set 'connectInject.enabled=true' \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "true" ]
}
@test "connectInject/MutatingWebhookConfiguration: disable with connectInject.enabled" {
cd `chart_dir`
local actual=$(helm template \
-x templates/connect-inject-mutatingwebhook.yaml \
--set 'connectInject.enabled=false' \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "false" ]
}
@test "connectInject/MutatingWebhookConfiguration: disable with global.enabled" {
cd `chart_dir`
local actual=$(helm template \
-x templates/connect-inject-mutatingwebhook.yaml \
--set 'global.enabled=false' \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "false" ]
}