Skip to content

Commit

Permalink
fix unsafe asserts (ansible-collections#2013)
Browse files Browse the repository at this point in the history
fix unsafe asserts

SUMMARY
Closes ansible-collections#2012
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
integrationtests

Reviewed-by: Mark Chappell
Reviewed-by: Alina Buzachis

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@4bdcecd
  • Loading branch information
markuman authored and mandar242 committed Sep 30, 2024
1 parent 63da0ee commit a342f5d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/integration/targets/elb_classic_lb_info/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
that:
- create is changed
# We rely on these for the info test, make sure they're what we expect
- '"{{ aws_region }}a" in create.elb.zones'
- '"{{ aws_region }}b" in create.elb.zones'
- aws_region ~ 'a' in create.elb.zones
- aws_region ~ 'b' in create.elb.zones
- create.elb.health_check.healthy_threshold == 10
- create.elb.health_check.interval == 30
- create.elb.health_check.target == "HTTP:80/index.html"
Expand All @@ -74,8 +74,8 @@
that:
- info.elbs|length == 1
- elb.availability_zones|length == 2
- '"{{ aws_region }}a" in elb.availability_zones'
- '"{{ aws_region }}b" in elb.availability_zones'
- aws_region ~ 'a' in elb.availability_zones
- aws_region ~ 'b' in elb.availability_zones
- elb.health_check.healthy_threshold == 10
- elb.health_check.interval == 30
- elb.health_check.target == "HTTP:80/index.html"
Expand Down Expand Up @@ -134,7 +134,7 @@
- assert:
that:
- update_az is changed
- update_az.elb.zones[0] == "{{ aws_region }}c"
- update_az.elb.zones[0] == aws_region ~ 'c'

- name: Get ELB info after changing AZ's
elb_classic_lb_info:
Expand All @@ -144,7 +144,7 @@
- assert:
that:
- elb.availability_zones|length == 1
- '"{{ aws_region }}c" in elb.availability_zones[0]'
- aws_region ~ 'c' in elb.availability_zones[0]
vars:
elb: "{{ info.elbs[0] }}"

Expand All @@ -170,9 +170,9 @@
- assert:
that:
- update_az is changed
- '"{{ aws_region }}a" in update_az.elb.zones'
- '"{{ aws_region }}b" in update_az.elb.zones'
- '"{{ aws_region }}c" in update_az.elb.zones'
- aws_region ~ 'a' in update_az.elb.zones
- aws_region ~ 'b' in update_az.elb.zones
- aws_region ~ 'c' in update_az.elb.zones

- name: Get ELB info after updating AZ's
elb_classic_lb_info:
Expand All @@ -182,9 +182,9 @@
- assert:
that:
- elb.availability_zones|length == 3
- '"{{ aws_region }}a" in elb.availability_zones'
- '"{{ aws_region }}b" in elb.availability_zones'
- '"{{ aws_region }}c" in elb.availability_zones'
- aws_region ~ 'a' in elb.availability_zones
- aws_region ~ 'b' in elb.availability_zones
- aws_region ~ 'c' in elb.availability_zones
vars:
elb: "{{ info.elbs[0] }}"

Expand Down

0 comments on commit a342f5d

Please sign in to comment.