mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-31 04:52:44 +00:00
helm consul toegevoegd ma nie als submodule?
This commit is contained in:
38
consul-helm/test/unit/mesh-gateway-clusterrolebinding.bats
Normal file
38
consul-helm/test/unit/mesh-gateway-clusterrolebinding.bats
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
load _helpers
|
||||
|
||||
@test "meshGateway/ClusterRoleBinding: disabled by default" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/mesh-gateway-clusterrolebinding.yaml \
|
||||
. | tee /dev/stderr |
|
||||
yq 'length > 0' | tee /dev/stderr)
|
||||
[ "${actual}" = "false" ]
|
||||
}
|
||||
|
||||
@test "meshGateway/ClusterRoleBinding: enabled with meshGateway, connectInject and client.grpc enabled" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/mesh-gateway-clusterrolebinding.yaml \
|
||||
--set 'meshGateway.enabled=true' \
|
||||
--set 'connectInject.enabled=true' \
|
||||
--set 'client.grpc=true' \
|
||||
. | tee /dev/stderr |
|
||||
yq 'length > 0' | tee /dev/stderr)
|
||||
[ "${actual}" = "true" ]
|
||||
}
|
||||
|
||||
@test "meshGateway/ClusterRoleBinding: subject name is correct" {
|
||||
cd `chart_dir`
|
||||
local actual=$(helm template \
|
||||
-x templates/mesh-gateway-clusterrolebinding.yaml \
|
||||
--set 'meshGateway.enabled=true' \
|
||||
--set 'connectInject.enabled=true' \
|
||||
--set 'client.grpc=true' \
|
||||
--name 'release-name' \
|
||||
. | tee /dev/stderr |
|
||||
yq -r '.subjects[0].name' | tee /dev/stderr)
|
||||
[ "${actual}" = "release-name-consul-mesh-gateway" ]
|
||||
}
|
||||
|
Reference in New Issue
Block a user