From 370b90b785c1848a584b4ce03f2fb2071d56ed37 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Thu, 31 Aug 2023 17:13:41 +0200 Subject: [PATCH] tests drop use of ec2_region (#1721) Integration tests - Drop use of ec2_region SUMMARY Follow up to #1714 missed "ec2_region" ISSUE TYPE Docs Pull Request COMPONENT NAME tests/ ADDITIONAL INFORMATION Reviewed-by: Alina Buzachis --- changelogs/fragments/ec2_region.yml | 2 ++ .../targets/ec2_instance_instance_multiple/tasks/main.yml | 2 +- .../targets/ec2_instance_uptime/tasks/main.yml | 6 +++--- tests/integration/targets/rds_param_group/tasks/main.yml | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 changelogs/fragments/ec2_region.yml diff --git a/changelogs/fragments/ec2_region.yml b/changelogs/fragments/ec2_region.yml new file mode 100644 index 00000000000..2b105de1fd2 --- /dev/null +++ b/changelogs/fragments/ec2_region.yml @@ -0,0 +1,2 @@ +trivial: +- tweak integration tests to use aws_region rather than ec2_region. diff --git a/tests/integration/targets/ec2_instance_instance_multiple/tasks/main.yml b/tests/integration/targets/ec2_instance_instance_multiple/tasks/main.yml index 03516cd038f..dcbb008f8ec 100644 --- a/tests/integration/targets/ec2_instance_instance_multiple/tasks/main.yml +++ b/tests/integration/targets/ec2_instance_instance_multiple/tasks/main.yml @@ -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"] diff --git a/tests/integration/targets/ec2_instance_uptime/tasks/main.yml b/tests/integration/targets/ec2_instance_uptime/tasks/main.yml index 034514ee502..10c2d85c021 100644 --- a/tests/integration/targets/ec2_instance_uptime/tasks/main.yml +++ b/tests/integration/targets/ec2_instance_uptime/tasks/main.yml @@ -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 }}" @@ -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"] @@ -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"] diff --git a/tests/integration/targets/rds_param_group/tasks/main.yml b/tests/integration/targets/rds_param_group/tasks/main.yml index 274dbee906a..e3d1c145a97 100644 --- a/tests/integration/targets/rds_param_group/tasks/main.yml +++ b/tests/integration/targets/rds_param_group/tasks/main.yml @@ -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: # ============================================================