Skip to content

Commit

Permalink
Merge pull request #17112 from anvial/3.3-to-3.4-merge-20240327
Browse files Browse the repository at this point in the history
#17112

No conflicts.

- d52737e (origin/3.3, 3.3) Merge pull request #17105 from anvial/add-condition-for-empty-sg
  • Loading branch information
jujubot committed Mar 27, 2024
2 parents 07d5d16 + 31f02f6 commit fd1226a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/includes/wait-for.sh
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ wait_for_aws_ingress_cidrs_for_port_range() {
secgrp_list=$(aws ec2 describe-security-groups --filters Name=ip-permission.from-port,Values=${from_port} Name=ip-permission.to-port,Values=${to_port})
# print the security group rules
# shellcheck disable=SC2086
got_cidrs=$(echo ${secgrp_list} | jq -r ".SecurityGroups[0].IpPermissions | .[] | select(.FromPort == ${from_port} and .ToPort == ${to_port}) | .Ip${ipV6Suffix}Ranges | .[] | .CidrIp${ipV6Suffix}" | sort | paste -sd, -)
got_cidrs=$(echo ${secgrp_list} | jq -r ".SecurityGroups[0].IpPermissions // [] | .[] | select(.FromPort == ${from_port} and .ToPort == ${to_port}) | .Ip${ipV6Suffix}Ranges // [] | .[] | .CidrIp${ipV6Suffix}" | sort | paste -sd, -)

attempt=0
# shellcheck disable=SC2046,SC2143
Expand All @@ -360,7 +360,7 @@ wait_for_aws_ingress_cidrs_for_port_range() {
# shellcheck disable=SC2086
secgrp_list=$(aws ec2 describe-security-groups --filters Name=ip-permission.from-port,Values=${from_port} Name=ip-permission.to-port,Values=${to_port})
# shellcheck disable=SC2086
got_cidrs=$(echo ${secgrp_list} | jq -r ".SecurityGroups[0].IpPermissions | .[] | select(.FromPort == ${from_port} and .ToPort == ${to_port}) | .Ip${ipV6Suffix}Ranges | .[] | .CidrIp${ipV6Suffix}" | sort | paste -sd, -)
got_cidrs=$(echo ${secgrp_list} | jq -r ".SecurityGroups[0].IpPermissions // [] | .[] | select(.FromPort == ${from_port} and .ToPort == ${to_port}) | .Ip${ipV6Suffix}Ranges // [] | .[] | .CidrIp${ipV6Suffix}" | sort | paste -sd, -)
sleep "${SHORT_TIMEOUT}"

if [ "$got_cidrs" == "$exp_cidrs" ]; then
Expand Down

0 comments on commit fd1226a

Please sign in to comment.