mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-30 12:32:45 +00:00
NO MORE GIT SUBMODULE
This commit is contained in:
53
consul-helm/test/unit/client-clusterrolebinding.bats
Normal file
53
consul-helm/test/unit/client-clusterrolebinding.bats
Normal file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load _helpers
|
||||
|
||||
@test "client/ClusterRoleBinding: enabled by default" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/client-clusterrolebinding.yaml \
|
||||
. | tee /dev/stderr |
|
||||
yq 'length > 0' | tee /dev/stderr)
|
||||
[ "${actual}" = "true" ]
|
||||
}
|
||||
|
||||
@test "client/ClusterRoleBinding: disabled with global.enabled=false" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/client-clusterrolebinding.yaml \
|
||||
--set 'global.enabled=false' \
|
||||
. | tee /dev/stderr |
|
||||
yq 'length > 0' | tee /dev/stderr)
|
||||
[ "${actual}" = "false" ]
|
||||
}
|
||||
|
||||
@test "client/ClusterRoleBinding: disabled with client disabled" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/client-clusterrolebinding.yaml \
|
||||
--set 'client.enabled=false' \
|
||||
. | tee /dev/stderr |
|
||||
yq 'length > 0' | tee /dev/stderr)
|
||||
[ "${actual}" = "false" ]
|
||||
}
|
||||
|
||||
@test "client/ClusterRoleBinding: enabled with client enabled" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/client-clusterrolebinding.yaml \
|
||||
--set 'client.enabled=true' \
|
||||
. | tee /dev/stderr |
|
||||
yq -s 'length > 0' | tee /dev/stderr)
|
||||
[ "${actual}" = "true" ]
|
||||
}
|
||||
|
||||
@test "client/ClusterRoleBinding: enabled with client enabled and global.enabled=false" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/client-clusterrolebinding.yaml \
|
||||
--set 'global.enabled=false' \
|
||||
--set 'client.enabled=true' \
|
||||
. | tee /dev/stderr |
|
||||
yq -s 'length > 0' | tee /dev/stderr)
|
||||
[ "${actual}" = "true" ]
|
||||
}
|
Reference in New Issue
Block a user