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

43 lines
1.2 KiB
YAML
Executable file

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