Skip to content

Commit

Permalink
tests drop use of ec2_region (ansible-collections#1721)
Browse files Browse the repository at this point in the history
Integration tests - Drop use of ec2_region

SUMMARY
Follow up to ansible-collections#1714
missed "ec2_region"
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
tests/
ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
  • Loading branch information
tremble committed Sep 11, 2023
1 parent 6174b92 commit 86eb268
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/ec2_region.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trivial:
- tweak integration tests to use aws_region rather than ec2_region.
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@

- name: Gather information about any running instance with Name ending with "-test-enf_cnt"
ec2_instance_info:
region: "{{ ec2_region }}"
region: "{{ aws_region }}"
filters:
"tag:Name": "*-test-enf_cnt"
instance-state-name: [ "running"]
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/targets/ec2_instance_uptime/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ec2_instance:
state: 'running'
name: "{{ resource_prefix }}-test-uptime"
region: "{{ ec2_region }}"
region: "{{ aws_region }}"
image_id: "{{ ec2_ami_id }}"
tags:
TestId: "{{ ec2_instance_tag_TestId }}"
Expand All @@ -32,7 +32,7 @@

- name: "check using uptime 100 hours - should find nothing"
ec2_instance_info:
region: "{{ ec2_region }}"
region: "{{ aws_region }}"
uptime: 6000
filters:
instance-state-name: [ "running"]
Expand All @@ -51,7 +51,7 @@

- name: "check using uptime 1 minute"
ec2_instance_info:
region: "{{ ec2_region }}"
region: "{{ aws_region }}"
uptime: 1
filters:
instance-state-name: [ "running"]
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/targets/rds_param_group/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
- name: rds_option_group tests
module_defaults:
group/aws:
ec2_access_key: '{{ aws_access_key }}'
ec2_secret_key: '{{ aws_secret_key }}'
security_token: '{{ security_token | default(omit) }}'
region: '{{ ec2_region }}'
access_key: '{{ aws_access_key }}'
secret_key: '{{ aws_secret_key }}'
session_token: '{{ security_token | default(omit) }}'
region: '{{ aws_region }}'
block:

# ============================================================
Expand Down

0 comments on commit 86eb268

Please sign in to comment.