helm consul toegevoegd ma nie als submodule?

This commit is contained in:
2020-03-09 12:27:10 +01:00
parent 31368e50b2
commit 3432492589
157 changed files with 14508 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
#!/usr/bin/env bats
load _helpers
@test "enterpriseLicense/ClusterRoleBinding: disabled by default" {
cd `chart_dir`
local actual=$(helm template \
-x templates/enterprise-license-clusterrolebinding.yaml \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "false" ]
}
@test "enterpriseLicense/ClusterRoleBinding: disabled with server=false, ent secret defined" {
cd `chart_dir`
local actual=$(helm template \
-x templates/enterprise-license-clusterrolebinding.yaml \
--set 'server.enabled=false' \
--set 'server.enterpriseLicense.secretName=foo' \
--set 'server.enterpriseLicense.secretKey=bar' \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "false" ]
}
@test "enterpriseLicense/ClusterRoleBinding: disabled when ent secretName missing" {
cd `chart_dir`
local actual=$(helm template \
-x templates/enterprise-license-clusterrolebinding.yaml \
--set 'server.enterpriseLicense.secretKey=bar' \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "false" ]
}
@test "enterpriseLicense/ClusterRoleBinding: disabled when ent secretKey missing" {
cd `chart_dir`
local actual=$(helm template \
-x templates/enterprise-license-clusterrolebinding.yaml \
--set 'server.enterpriseLicense.secretName=foo' \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "false" ]
}
@test "enterpriseLicense/ClusterRoleBinding: enabled when ent license defined" {
cd `chart_dir`
local actual=$(helm template \
-x templates/enterprise-license-clusterrolebinding.yaml \
--set 'server.enterpriseLicense.secretName=foo' \
--set 'server.enterpriseLicense.secretKey=bar' \
. | tee /dev/stderr |
yq 'length > 0' | tee /dev/stderr)
[ "${actual}" = "true" ]
}