Skip to content

Commit

Permalink
draft
Browse files Browse the repository at this point in the history
  • Loading branch information
markuman committed Dec 1, 2023
1 parent 0ffa3dd commit f47ad74
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 57 deletions.
6 changes: 3 additions & 3 deletions tests/integration/targets/api_gateway_domain/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- assert:
that:
- create_result.changed == True
- create_result.response.domain.domain_name == "{{ api_gateway_domain_name }}"
- create_result.response.domain.domain_name == api_gateway_domain_name
- create_result.response.domain.distribution_domain_name is defined
- create_result.response.domain.distribution_hosted_zone_id is defined
- create_result.response.path_mappings is defined
Expand All @@ -59,7 +59,7 @@
that:
- repeat_result.changed == False
- repeat_result.failed == False
- repeat_result.response.domain_name == "{{ api_gateway_domain_name }}"
- repeat_result.response.domain_name == api_gateway_domain_name

- name: Update Test - API gateway custom domain setup, change settings
api_gateway_domain:
Expand All @@ -75,7 +75,7 @@
- assert:
that:
- update_result.changed == True
- update_result.response.domain.domain_name == "{{ api_gateway_domain_name }}"
- update_result.response.domain.domain_name == api_gateway_domain_name
- update_result.response.domain.security_policy == 'TLS_1_2'
- update_result.response.domain.endpoint_configuration.types.0 == 'REGIONAL'
- update_result.response.path_mappings.0.base_path = '/v1'
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
that:
- scheduled_action is successful
- scheduled_action is changed
- scheduled_action.scheduled_action_name == "{{ resource_prefix }}-test"
- scheduled_action.scheduled_action_name == resource_prefix ~ '-test'
- scheduled_action.desired_capacity == 2

- name: Create basic scheduled_action - idempotent
Expand Down Expand Up @@ -155,7 +155,7 @@
that:
- scheduled_action is successful
- scheduled_action is changed
- scheduled_action.scheduled_action_name == "{{ resource_prefix }}-test"
- scheduled_action.scheduled_action_name == resource_prefix ~ '-test'
- scheduled_action.desired_capacity == 3
- scheduled_action.min_size == 3

Expand Down Expand Up @@ -217,7 +217,7 @@
that:
- advanced_scheduled_action is successful
- advanced_scheduled_action is changed
- advanced_scheduled_action.scheduled_action_name == "{{ resource_prefix }}-test1"
- advanced_scheduled_action.scheduled_action_name == resource_prefix ~ '-test1'
- advanced_scheduled_action.desired_capacity == 2
- advanced_scheduled_action.min_size == 2
- advanced_scheduled_action.max_size == 5
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/connection/test_assume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

- assert:
that:
- id_cmd.stdout == '{{ user_name }}'
- id_cmd.stdout == user_name
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
18 changes: 9 additions & 9 deletions tests/integration/targets/efs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
- efs_result.efs[0].mount_targets[1].security_groups[0] == vpc_default_sg_id

- assert:
that: "{{efs_result_assertions}}"
that: efs_result_assertions

# ============================================================
- name: Get EFS by id
Expand All @@ -107,7 +107,7 @@
register: efs_result

- assert:
that: "{{efs_result_assertions}}"
that: efs_result_assertions

# ============================================================
- name: Get EFS by tag
Expand All @@ -117,7 +117,7 @@
register: efs_result

- assert:
that: "{{efs_result_assertions}}"
that: efs_result_assertions

# ============================================================
- name: Get EFS by target (subnet_id)
Expand All @@ -127,7 +127,7 @@
register: efs_result

- assert:
that: "{{efs_result_assertions}}"
that: efs_result_assertions

# ============================================================
- name: Get EFS by target (security_group_id)
Expand All @@ -137,7 +137,7 @@
register: efs_result

- assert:
that: "{{efs_result_assertions}}"
that: efs_result_assertions

# ============================================================
- name: Get EFS by tag and target
Expand All @@ -149,7 +149,7 @@
register: efs_result

- assert:
that: "{{efs_result_assertions}}"
that: efs_result_assertions

# ============================================================
# Not checking efs_result.efs["throughput_mode"] here as
Expand Down Expand Up @@ -231,7 +231,7 @@
- efs_result.efs[0].file_system_id == created_efs.efs.file_system_id

- assert:
that: "{{efs_result_assertions}}"
that: efs_result_assertions

# ============================================================
- name: Efs configure IA transition
Expand Down Expand Up @@ -366,7 +366,7 @@
- efs_tag_result.tags.Env is defined
- efs_tag_result.tags.Env is search("IntegrationTests")
- efs_tag_result.tags.Name is defined
- efs_tag_result.tags.Name is search("{{ efs_name }}-test-tag")
- efs_tag_result.tags.Name is search(efs_name ~ '-test-tag')
- efs_tag_result.tags["CamelCase"] == 'SimpleCamelCase'
- efs_tag_result.tags["Title Case"] == 'Hello Cruel World'
- efs_tag_result.tags["lowercase spaced"] == 'hello cruel world'
Expand Down Expand Up @@ -464,7 +464,7 @@
- efs_tag_result.tags.Env is defined
- efs_tag_result.tags.Env is search("IntegrationTests")
- efs_tag_result.tags.Name is defined
- efs_tag_result.tags.Name is search("{{ efs_name }}-test-tag")
- efs_tag_result.tags.Name is search(efs_name ~ '-test-tag')
- not efs_tag_result.tags["CamelCase"] is defined
- not efs_tag_result.tags["Title Case"] is defined
- not efs_tag_result.tags["lowercase spaced"] is defined
Expand Down
Loading

0 comments on commit f47ad74

Please sign in to comment.