Skip to content

Commit

Permalink
actually fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
missylbytes committed Feb 7, 2024
1 parent b37685c commit a7d3817
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion charts/consul/test/unit/mesh-gateway-deployment.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,16 @@ key2: value2' \
yq -r '.spec.template.spec.containers[0].securityContext' | tee /dev/stderr)

[ $(echo "${actual}" | yq -r '.capabilities.drop | length') -eq 0 ]
[ $(echo "${actual}" | yq -r '.capabilities.add[0]') = "NET_BIND_SERVICE" ]
}

@test "meshGateway/Deployment: drop ALL capabilities when hostNetwork!=true" {
cd `chart_dir`
local actual=$(helm template \
-s templates/mesh-gateway-deployment.yaml \
--set 'meshGateway.enabled=true' \
--set 'connectInject.enabled=true' \
. | tee /dev/stderr |
yq -r '.spec.template.spec.containers[0].securityContext' | tee /dev/stderr)

[ $(echo "${actual}" | yq -r '.capabilities.drop[0]') = "ALL" ]
}

0 comments on commit a7d3817

Please sign in to comment.