Skip to content

Commit

Permalink
fix lengths of rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jm96441n committed Apr 22, 2024
1 parent 8308f27 commit 5ef72f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions charts/consul/test/unit/terminating-gateways-role.bats
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ load _helpers
--set 'global.enablePodSecurityPolicies=true' \
. | tee /dev/stderr |
yq -s -r '.[0].rules | length' | tee /dev/stderr)
[ "${actual}" = "2" ]
[ "${actual}" = "1" ]
}

@test "terminatingGateways/Role: rules for ACLs, PSPs with multiple gateways" {
Expand All @@ -76,10 +76,10 @@ load _helpers
[ "${actual}" = "release-name-consul-gateway2" ]

local actual=$(echo $object | yq '.[0].rules | length' | tee /dev/stderr)
[ "${actual}" = "2" ]
[ "${actual}" = "1" ]

local actual=$(echo $object | yq '.[1].rules | length' | tee /dev/stderr)
[ "${actual}" = "2" ]
[ "${actual}" = "1" ]

local actual=$(echo $object | yq '.[2] | length > 0' | tee /dev/stderr)
[ "${actual}" = "false" ]
Expand Down

0 comments on commit 5ef72f3

Please sign in to comment.