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 GomathiselviS committed Oct 16, 2024
1 parent d332db4 commit 5894bc9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions tests/integration/targets/ec2_placement_group/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- assert:
that:
- pg_1_create_check_mode is changed
- pg_1_create_check_mode.placement_group.name == '{{ resource_prefix }}-pg1'
- pg_1_create_check_mode.placement_group.name == resource_prefix ~ '-pg1'
- pg_1_create_check_mode.placement_group.state == "DryRun"
- '"ec2:CreatePlacementGroup" in pg_1_create_check_mode.resource_actions'

Expand All @@ -41,7 +41,7 @@
- assert:
that:
- pg_1_create is changed
- pg_1_create.placement_group.name == '{{ resource_prefix }}-pg1'
- pg_1_create.placement_group.name == resource_prefix ~ '-pg1'
- pg_1_create.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" in pg_1_create.resource_actions'

Expand All @@ -54,7 +54,7 @@
- assert:
that:
- pg_1_info_result is not changed
- pg_1_info_result.placement_groups[0].name == '{{ resource_prefix }}-pg1'
- pg_1_info_result.placement_groups[0].name == resource_prefix ~ '-pg1'
- pg_1_info_result.placement_groups[0].state == "available"
- pg_1_info_result.placement_groups[0].strategy == "cluster"
- '"ec2:DescribePlacementGroups" in pg_1_info_result.resource_actions'
Expand All @@ -68,7 +68,7 @@
- assert:
that:
- pg_1_create is not changed
- pg_1_create.placement_group.name == '{{ resource_prefix }}-pg1'
- pg_1_create.placement_group.name == resource_prefix ~ '-pg1'
- pg_1_create.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" not in pg_1_create.resource_actions'

Expand All @@ -82,7 +82,7 @@
- assert:
that:
- pg_1_create_check_mode_idem is not changed
- pg_1_create_check_mode_idem.placement_group.name == '{{ resource_prefix }}-pg1'
- pg_1_create_check_mode_idem.placement_group.name == resource_prefix ~ '-pg1'
- pg_1_create_check_mode_idem.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" not in pg_1_create_check_mode_idem.resource_actions'

Expand All @@ -97,7 +97,7 @@
- assert:
that:
- pg_2_create_check_mode is changed
- pg_2_create_check_mode.placement_group.name == '{{ resource_prefix }}-pg2'
- pg_2_create_check_mode.placement_group.name == resource_prefix ~ '-pg2'
- pg_2_create_check_mode.placement_group.state == "DryRun"
- '"ec2:CreatePlacementGroup" in pg_2_create_check_mode.resource_actions'

Expand All @@ -111,7 +111,7 @@
- assert:
that:
- pg_2_create is changed
- pg_2_create.placement_group.name == '{{ resource_prefix }}-pg2'
- pg_2_create.placement_group.name == resource_prefix ~ '-pg2'
- pg_2_create.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" in pg_2_create.resource_actions'

Expand All @@ -127,7 +127,7 @@
- assert:
that:
- pg_2_info_result is not changed
- pg_2_info_result.placement_groups[0].name == '{{ resource_prefix }}-pg2'
- pg_2_info_result.placement_groups[0].name == resource_prefix ~ '-pg2'
- pg_2_info_result.placement_groups[0].state == "available"
- pg_2_info_result.placement_groups[0].strategy == "spread"
- '"ec2:DescribePlacementGroups" in pg_2_info_result.resource_actions'
Expand All @@ -142,7 +142,7 @@
- assert:
that:
- pg_2_create is not changed
- pg_2_create.placement_group.name == '{{ resource_prefix }}-pg2'
- pg_2_create.placement_group.name == resource_prefix ~ '-pg2'
- pg_2_create.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" not in pg_2_create.resource_actions'

Expand All @@ -157,7 +157,7 @@
- assert:
that:
- pg_2_create_check_mode_idem is not changed
- pg_2_create_check_mode_idem.placement_group.name == '{{ resource_prefix }}-pg2'
- pg_2_create_check_mode_idem.placement_group.name == resource_prefix ~ '-pg2'
- pg_2_create_check_mode_idem.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" not in pg_2_create_check_mode_idem.resource_actions'

Expand All @@ -173,7 +173,7 @@
- assert:
that:
- pg_3_create_check_mode is changed
- pg_3_create_check_mode.placement_group.name == '{{ resource_prefix }}-pg3'
- pg_3_create_check_mode.placement_group.name == resource_prefix ~ '-pg3'
- pg_3_create_check_mode.placement_group.state == "DryRun"
- '"ec2:CreatePlacementGroup" in pg_3_create_check_mode.resource_actions'

Expand All @@ -188,7 +188,7 @@
- assert:
that:
- pg_3_create is changed
- pg_3_create.placement_group.name == '{{ resource_prefix }}-pg3'
- pg_3_create.placement_group.name == resource_prefix ~ '-pg3'
- pg_3_create.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" in pg_3_create.resource_actions'

Expand All @@ -205,7 +205,7 @@
- assert:
that:
- pg_3_info_result is not changed
- pg_3_info_result.placement_groups[0].name == '{{ resource_prefix }}-pg3'
- pg_3_info_result.placement_groups[0].name == resource_prefix ~ '-pg3'
- pg_3_info_result.placement_groups[0].state == "available"
- pg_3_info_result.placement_groups[0].strategy == "partition"
- '"ec2:DescribePlacementGroups" in pg_3_info_result.resource_actions'
Expand All @@ -221,7 +221,7 @@
- assert:
that:
- pg_3_create is not changed
- pg_3_create.placement_group.name == '{{ resource_prefix }}-pg3'
- pg_3_create.placement_group.name == resource_prefix ~ '-pg3'
- pg_3_create.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" not in pg_3_create.resource_actions'

Expand All @@ -237,7 +237,7 @@
- assert:
that:
- pg_3_create_check_mode_idem is not changed
- pg_3_create_check_mode_idem.placement_group.name == '{{ resource_prefix }}-pg3'
- pg_3_create_check_mode_idem.placement_group.name == resource_prefix ~ '-pg3'
- pg_3_create_check_mode_idem.placement_group.state == "available"
- '"ec2:CreatePlacementGroup" not in pg_3_create_check_mode_idem.resource_actions'

Expand Down

0 comments on commit 5894bc9

Please sign in to comment.