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 abikouo committed Oct 16, 2024
1 parent 8a10129 commit 56d1e58
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

- assert:
that:
- "'An error occurred (ActiveInstanceRefreshNotFound) when calling the CancelInstanceRefresh operation: No in progress or pending Instance Refresh found for Auto Scaling group {{ resource_prefix }}-asg' in result.msg"
- "'An error occurred (ActiveInstanceRefreshNotFound) when calling the CancelInstanceRefresh operation: No in progress or pending Instance Refresh found for Auto Scaling group ' ~ resource_prefix ~ '-asg' in result.msg"

- name: test starting a refresh with a valid ASG name - check_mode
autoscaling_instance_refresh:
Expand Down Expand Up @@ -323,7 +323,7 @@

- assert:
that:
- "{{ output.instance_refreshes|length }} == 0"
- output.instance_refreshes | length == 0

- name: test using a real refresh ID
autoscaling_instance_refresh_info:
Expand All @@ -334,7 +334,7 @@

- assert:
that:
- "{{ output.instance_refreshes |length }} == 1"
- output.instance_refreshes | length == 1

- name: test getting info for an ASG name which doesn't exist
autoscaling_instance_refresh_info:
Expand All @@ -354,7 +354,7 @@

- assert:
that:
- "{{ output.instance_refreshes|length }} == 7"
- output.instance_refreshes | length == 7

- name: assert that valid message with fake-token is returned
autoscaling_instance_refresh_info:
Expand All @@ -376,7 +376,7 @@

- assert:
that:
- "{{ output.instance_refreshes|length }} < 2"
- output.instance_refreshes | length < 2

- name: assert that valid message with real-token is returned
autoscaling_instance_refresh_info:
Expand All @@ -387,7 +387,7 @@

- assert:
that:
- "{{ output.instance_refreshes|length }} == 7"
- output.instance_refreshes | length == 7

- name: test using both real nextToken and max_records=1
autoscaling_instance_refresh_info:
Expand All @@ -399,7 +399,7 @@

- assert:
that:
- "{{ output.instance_refreshes|length }} == 1"
- output.instance_refreshes | length == 1

always:

Expand Down

0 comments on commit 56d1e58

Please sign in to comment.