-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor Sanity test fixes SUMMARY Steal sanity fixes from #1393 ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/modules/backup_tag_info.py plugins/modules/backup_vault.py plugins/modules/route53_info.py test-requirements.txt ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis
- Loading branch information
Showing
13 changed files
with
167 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
minor_changes: | ||
- route53_info - drop unused imports (https://github.com/ansible-collections/amazon.aws/pull/1462). | ||
trivial: | ||
# Not yet released | ||
- backup_tag_info - sanity fixes | ||
- backup_vault - sanity fixes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
tests/integration/targets/ec2_vpc_endpoint_service_info/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
search_service_names: | ||
- 'com.amazonaws.{{ aws_region }}.s3' | ||
- 'com.amazonaws.{{ aws_region }}.ec2' | ||
- 'com.amazonaws.{{ aws_region }}.s3' | ||
- 'com.amazonaws.{{ aws_region }}.ec2' |
242 changes: 121 additions & 121 deletions
242
tests/integration/targets/ec2_vpc_endpoint_service_info/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,135 +1,135 @@ | ||
--- | ||
- module_defaults: | ||
- name: Verify ec2_vpc_endpoint_service_info | ||
module_defaults: | ||
group/aws: | ||
aws_access_key: '{{ aws_access_key }}' | ||
aws_secret_key: '{{ aws_secret_key }}' | ||
security_token: '{{ security_token | default(omit) }}' | ||
region: '{{ aws_region }}' | ||
aws_access_key: "{{ aws_access_key }}" | ||
aws_secret_key: "{{ aws_secret_key }}" | ||
security_token: "{{ security_token | default(omit) }}" | ||
region: "{{ aws_region }}" | ||
collections: | ||
- amazon.aws | ||
- community.aws | ||
block: | ||
- name: "List all available services (Check Mode)" | ||
ec2_vpc_endpoint_service_info: | ||
check_mode: true | ||
register: services_check | ||
|
||
- name: 'List all available services (Check Mode)' | ||
ec2_vpc_endpoint_service_info: | ||
check_mode: True | ||
register: services_check | ||
- name: "Verify services (Check Mode)" | ||
vars: | ||
first_service: "{{ services_check.service_details[0] }}" | ||
ansible.builtin.assert: | ||
that: | ||
- services_check is successful | ||
- services_check is not changed | ||
- '"service_names" in services_check' | ||
- '"service_details" in services_check' | ||
- '"acceptance_required" in first_service' | ||
- '"availability_zones" in first_service' | ||
- '"base_endpoint_dns_names" in first_service' | ||
- '"manages_vpc_endpoints" in first_service' | ||
- '"owner" in first_service' | ||
- '"private_dns_name" in first_service' | ||
- '"private_dns_name_verification_state" in first_service' | ||
- '"service_id" in first_service' | ||
- '"service_name" in first_service' | ||
- '"service_type" in first_service' | ||
- '"tags" in first_service' | ||
- '"vpc_endpoint_policy_supported" in first_service' | ||
|
||
- name: 'Verify services (Check Mode)' | ||
vars: | ||
first_service: '{{ services_check.service_details[0] }}' | ||
assert: | ||
that: | ||
- services_check is successful | ||
- services_check is not changed | ||
- '"service_names" in services_check' | ||
- '"service_details" in services_check' | ||
- '"acceptance_required" in first_service' | ||
- '"availability_zones" in first_service' | ||
- '"base_endpoint_dns_names" in first_service' | ||
- '"manages_vpc_endpoints" in first_service' | ||
- '"owner" in first_service' | ||
- '"private_dns_name" in first_service' | ||
- '"private_dns_name_verification_state" in first_service' | ||
- '"service_id" in first_service' | ||
- '"service_name" in first_service' | ||
- '"service_type" in first_service' | ||
- '"tags" in first_service' | ||
- '"vpc_endpoint_policy_supported" in first_service' | ||
- name: "List all available services" | ||
ec2_vpc_endpoint_service_info: | ||
register: services_info | ||
|
||
- name: 'List all available services' | ||
ec2_vpc_endpoint_service_info: | ||
register: services_info | ||
- name: "Verify services" | ||
vars: | ||
first_service: "{{ services_info.service_details[0] }}" | ||
ansible.builtin.assert: | ||
that: | ||
- services_info is successful | ||
- services_info is not changed | ||
- '"service_names" in services_info' | ||
- '"service_details" in services_info' | ||
- '"acceptance_required" in first_service' | ||
- '"availability_zones" in first_service' | ||
- '"base_endpoint_dns_names" in first_service' | ||
- '"manages_vpc_endpoints" in first_service' | ||
- '"owner" in first_service' | ||
- '"private_dns_name" in first_service' | ||
- '"private_dns_name_verification_state" in first_service' | ||
- '"service_id" in first_service' | ||
- '"service_name" in first_service' | ||
- '"service_type" in first_service' | ||
- '"tags" in first_service' | ||
- '"vpc_endpoint_policy_supported" in first_service' | ||
|
||
- name: 'Verify services' | ||
vars: | ||
first_service: '{{ services_info.service_details[0] }}' | ||
assert: | ||
that: | ||
- services_info is successful | ||
- services_info is not changed | ||
- '"service_names" in services_info' | ||
- '"service_details" in services_info' | ||
- '"acceptance_required" in first_service' | ||
- '"availability_zones" in first_service' | ||
- '"base_endpoint_dns_names" in first_service' | ||
- '"manages_vpc_endpoints" in first_service' | ||
- '"owner" in first_service' | ||
- '"private_dns_name" in first_service' | ||
- '"private_dns_name_verification_state" in first_service' | ||
- '"service_id" in first_service' | ||
- '"service_name" in first_service' | ||
- '"service_type" in first_service' | ||
- '"tags" in first_service' | ||
- '"vpc_endpoint_policy_supported" in first_service' | ||
- name: "Limit services by name" | ||
ec2_vpc_endpoint_service_info: | ||
service_names: "{{ search_service_names }}" | ||
register: services_info | ||
|
||
- name: 'Limit services by name' | ||
ec2_vpc_endpoint_service_info: | ||
service_names: '{{ search_service_names }}' | ||
register: services_info | ||
- name: "Verify services" | ||
vars: | ||
first_service: "{{ services_info.service_details[0] }}" | ||
# The same service sometimes pop up twice. s3 for example has | ||
# s3.us-east-1.amazonaws.com and s3.us-east-1.vpce.amazonaws.com which are | ||
# part of com.amazonaws.us-east-1.s3 so we need to run the results through | ||
# the unique filter to know if we've got what we think we have | ||
unique_names: "{{ services_info.service_names | unique | list }}" | ||
unique_detail_names: '{{ services_info.service_details | map(attribute="service_name") | unique | list }}' | ||
ansible.builtin.assert: | ||
that: | ||
- services_info is successful | ||
- services_info is not changed | ||
- '"service_names" in services_info' | ||
- (unique_names | length) == (search_service_names | length) | ||
- (unique_detail_names | length ) == (search_service_names | length) | ||
- (unique_names | difference(search_service_names) | length) == 0 | ||
- (unique_detail_names | difference(search_service_names) | length) == 0 | ||
- '"service_details" in services_info' | ||
- '"acceptance_required" in first_service' | ||
- '"availability_zones" in first_service' | ||
- '"base_endpoint_dns_names" in first_service' | ||
- '"manages_vpc_endpoints" in first_service' | ||
- '"owner" in first_service' | ||
- '"private_dns_name" in first_service' | ||
- '"private_dns_name_verification_state" in first_service' | ||
- '"service_id" in first_service' | ||
- '"service_name" in first_service' | ||
- '"service_type" in first_service' | ||
- '"tags" in first_service' | ||
- '"vpc_endpoint_policy_supported" in first_service' | ||
|
||
- name: 'Verify services' | ||
vars: | ||
first_service: '{{ services_info.service_details[0] }}' | ||
# The same service sometimes pop up twice. s3 for example has | ||
# s3.us-east-1.amazonaws.com and s3.us-east-1.vpce.amazonaws.com which are | ||
# part of com.amazonaws.us-east-1.s3 so we need to run the results through | ||
# the unique filter to know if we've got what we think we have | ||
unique_names: '{{ services_info.service_names | unique | list }}' | ||
unique_detail_names: '{{ services_info.service_details | map(attribute="service_name") | unique | list }}' | ||
assert: | ||
that: | ||
- services_info is successful | ||
- services_info is not changed | ||
- '"service_names" in services_info' | ||
- (unique_names | length) == (search_service_names | length) | ||
- (unique_detail_names | length ) == (search_service_names | length) | ||
- (unique_names | difference(search_service_names) | length) == 0 | ||
- (unique_detail_names | difference(search_service_names) | length) == 0 | ||
- '"service_details" in services_info' | ||
- '"acceptance_required" in first_service' | ||
- '"availability_zones" in first_service' | ||
- '"base_endpoint_dns_names" in first_service' | ||
- '"manages_vpc_endpoints" in first_service' | ||
- '"owner" in first_service' | ||
- '"private_dns_name" in first_service' | ||
- '"private_dns_name_verification_state" in first_service' | ||
- '"service_id" in first_service' | ||
- '"service_name" in first_service' | ||
- '"service_type" in first_service' | ||
- '"tags" in first_service' | ||
- '"vpc_endpoint_policy_supported" in first_service' | ||
- name: "Grab single service details to test filters" | ||
ansible.builtin.set_fact: | ||
example_service: "{{ services_info.service_details[0] }}" | ||
|
||
- name: 'Grab single service details to test filters' | ||
set_fact: | ||
example_service: '{{ services_info.service_details[0] }}' | ||
- name: "Limit services by filter" | ||
ec2_vpc_endpoint_service_info: | ||
filters: | ||
service-name: "{{ example_service.service_name }}" | ||
register: filtered_service | ||
|
||
- name: 'Limit services by filter' | ||
ec2_vpc_endpoint_service_info: | ||
filters: | ||
service-name: '{{ example_service.service_name }}' | ||
register: filtered_service | ||
|
||
- name: 'Verify services' | ||
vars: | ||
first_service: '{{ filtered_service.service_details[0] }}' | ||
assert: | ||
that: | ||
- filtered_service is successful | ||
- filtered_service is not changed | ||
- '"service_names" in filtered_service' | ||
- filtered_service.service_names | length == 1 | ||
- '"service_details" in filtered_service' | ||
- filtered_service.service_details | length == 1 | ||
- '"acceptance_required" in first_service' | ||
- '"availability_zones" in first_service' | ||
- '"base_endpoint_dns_names" in first_service' | ||
- '"manages_vpc_endpoints" in first_service' | ||
- '"owner" in first_service' | ||
- '"private_dns_name" in first_service' | ||
- '"private_dns_name_verification_state" in first_service' | ||
- '"service_id" in first_service' | ||
- '"service_name" in first_service' | ||
- '"service_type" in first_service' | ||
- '"tags" in first_service' | ||
- '"vpc_endpoint_policy_supported" in first_service' | ||
- name: "Verify services" | ||
vars: | ||
first_service: "{{ filtered_service.service_details[0] }}" | ||
ansible.builtin.assert: | ||
that: | ||
- filtered_service is successful | ||
- filtered_service is not changed | ||
- '"service_names" in filtered_service' | ||
- filtered_service.service_names | length == 1 | ||
- '"service_details" in filtered_service' | ||
- filtered_service.service_details | length == 1 | ||
- '"acceptance_required" in first_service' | ||
- '"availability_zones" in first_service' | ||
- '"base_endpoint_dns_names" in first_service' | ||
- '"manages_vpc_endpoints" in first_service' | ||
- '"owner" in first_service' | ||
- '"private_dns_name" in first_service' | ||
- '"private_dns_name_verification_state" in first_service' | ||
- '"service_id" in first_service' | ||
- '"service_name" in first_service' | ||
- '"service_type" in first_service' | ||
- '"tags" in first_service' | ||
- '"vpc_endpoint_policy_supported" in first_service' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.