43 lines
1.3 KiB
YAML
Executable file
43 lines
1.3 KiB
YAML
Executable file
#!/usr/bin/env bats
|
|
|
|
load _helpers
|
|
|
|
@test "connectInject/MutatingWebhookConfiguration: disabled by default" {
|
|
cd `chart_dir`
|
|
local actual=$(helm template \
|
|
-x templates/connect-inject-mutatingwebhook.yaml \
|
|
. | tee /dev/stderr |
|
|
yq 'length > 0' | tee /dev/stderr)
|
|
[ "${actual}" = "false" ]
|
|
}
|
|
|
|
@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" ]
|
|
}
|