Skip to content

Commit

Permalink
Add unit test for removing mounts when Vault is secrets backend
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancoleman committed Apr 27, 2023
1 parent b345f41 commit f3c2e8c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions charts/consul/test/unit/api-gateway-controller-deployment.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1572,6 +1572,21 @@ load _helpers
[ "${actual}" = "" ]
}

@test "apiGateway/Deployment: consul-ca-cert volume mount is not set when using Vault as a secrets backend" {
cd `chart_dir`
local actual=$(helm template \
-s templates/api-gateway-controller-deployment.yaml \
--set 'apiGateway.enabled=true' \
--set 'apiGateway.image=bar' \
--set 'global.acls.manageSystemACLs=true' \
--set 'global.tls.enabled=true' \
--set 'server.enabled=true' \
--set 'global.secretsBackend.vault.enabled=true' \
. | tee /dev/stderr |
yq '.spec.template.spec.containers[0].volumeMounts[] | select(.name == "consul-ca-cert")' | tee /dev/stderr)
[ "${actual}" = "" ]
}

@test "apiGateway/Deployment: consul-ca-cert volume mount is not set on acl-init when using externalServers and useSystemRoots" {
cd `chart_dir`
local actual=$(helm template \
Expand Down

0 comments on commit f3c2e8c

Please sign in to comment.