From 3c6cd7b25277d28ce8416ff7af632209cbb66122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Mon, 17 Oct 2022 11:38:12 -0400 Subject: [PATCH 1/7] rds_cluster: split up the test target Split up the test target to avoid the parallel execution. --- .../rds_cluster_split_functional_tests.yaml | 3 ++ .../integration/targets/rds_cluster/inventory | 23 ------------ .../integration/targets/rds_cluster/main.yml | 10 ----- .../targets/rds_cluster/meta/main.yml | 1 - .../roles/rds_cluster/meta/main.yml | 1 - .../roles/rds_cluster/tasks/main.yml | 10 ----- .../roles/rds_cluster/vars/main.yml | 1 - .../integration/targets/rds_cluster/runme.sh | 12 ------ .../aliases | 3 +- .../defaults/main.yml | 0 .../tasks/main.yaml} | 8 +++- .../targets/rds_cluster_create_sgs/aliases | 4 ++ .../rds_cluster_create_sgs/defaults/main.yml | 37 +++++++++++++++++++ .../tasks/main.yaml} | 8 +++- .../targets/rds_cluster_modify/aliases | 4 ++ .../rds_cluster_modify/defaults/main.yml | 37 +++++++++++++++++++ .../tasks/main.yaml} | 8 +++- .../targets/rds_cluster_promote/aliases | 7 ++++ .../rds_cluster_promote/defaults/main.yml | 37 +++++++++++++++++++ .../tasks/main.yaml} | 8 +++- .../targets/rds_cluster_restore/aliases | 4 ++ .../rds_cluster_restore/defaults/main.yml | 37 +++++++++++++++++++ .../tasks/main.yaml} | 8 +++- .../rds_cluster_snapshot/tasks/main.yml | 1 - .../targets/rds_cluster_tag/aliases | 4 ++ .../targets/rds_cluster_tag/defaults/main.yml | 37 +++++++++++++++++++ .../tasks/main.yaml} | 8 +++- 27 files changed, 254 insertions(+), 67 deletions(-) create mode 100644 changelogs/fragments/rds_cluster_split_functional_tests.yaml delete mode 100644 tests/integration/targets/rds_cluster/inventory delete mode 100644 tests/integration/targets/rds_cluster/main.yml delete mode 100644 tests/integration/targets/rds_cluster/meta/main.yml delete mode 100644 tests/integration/targets/rds_cluster/roles/rds_cluster/meta/main.yml delete mode 100644 tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/main.yml delete mode 100644 tests/integration/targets/rds_cluster/roles/rds_cluster/vars/main.yml delete mode 100755 tests/integration/targets/rds_cluster/runme.sh rename tests/integration/targets/{rds_cluster => rds_cluster_create}/aliases (75%) rename tests/integration/targets/{rds_cluster/roles/rds_cluster => rds_cluster_create}/defaults/main.yml (100%) rename tests/integration/targets/{rds_cluster/roles/rds_cluster/tasks/test_create.yml => rds_cluster_create/tasks/main.yaml} (94%) create mode 100644 tests/integration/targets/rds_cluster_create_sgs/aliases create mode 100644 tests/integration/targets/rds_cluster_create_sgs/defaults/main.yml rename tests/integration/targets/{rds_cluster/roles/rds_cluster/tasks/test_create_sgs.yml => rds_cluster_create_sgs/tasks/main.yaml} (97%) create mode 100644 tests/integration/targets/rds_cluster_modify/aliases create mode 100644 tests/integration/targets/rds_cluster_modify/defaults/main.yml rename tests/integration/targets/{rds_cluster/roles/rds_cluster/tasks/test_modify.yml => rds_cluster_modify/tasks/main.yaml} (98%) create mode 100644 tests/integration/targets/rds_cluster_promote/aliases create mode 100644 tests/integration/targets/rds_cluster_promote/defaults/main.yml rename tests/integration/targets/{rds_cluster/roles/rds_cluster/tasks/test_promote.yml => rds_cluster_promote/tasks/main.yaml} (96%) create mode 100644 tests/integration/targets/rds_cluster_restore/aliases create mode 100644 tests/integration/targets/rds_cluster_restore/defaults/main.yml rename tests/integration/targets/{rds_cluster/roles/rds_cluster/tasks/test_restore.yml => rds_cluster_restore/tasks/main.yaml} (97%) create mode 100644 tests/integration/targets/rds_cluster_tag/aliases create mode 100644 tests/integration/targets/rds_cluster_tag/defaults/main.yml rename tests/integration/targets/{rds_cluster/roles/rds_cluster/tasks/test_tag.yml => rds_cluster_tag/tasks/main.yaml} (98%) diff --git a/changelogs/fragments/rds_cluster_split_functional_tests.yaml b/changelogs/fragments/rds_cluster_split_functional_tests.yaml new file mode 100644 index 00000000000..ebe82f334a7 --- /dev/null +++ b/changelogs/fragments/rds_cluster_split_functional_tests.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: +- "rds_cluster - Split up the functional tests in smaller targets (https://github.com/ansible-collections/amazon.aws/pull/1175)." diff --git a/tests/integration/targets/rds_cluster/inventory b/tests/integration/targets/rds_cluster/inventory deleted file mode 100644 index 1acd8642050..00000000000 --- a/tests/integration/targets/rds_cluster/inventory +++ /dev/null @@ -1,23 +0,0 @@ -[tests] -# basic rds_cluster cretion tests -create - -# restore cluster tests -restore - -# TODO: Cannot be tested in the CI because: -# An error occurred (InvalidParameterValue) when calling the CreateDBCluster operation: Replication from cluster in same region is not supported -# promote - -# security groups db tests -create_sgs - -# basic modify operations applied on the rds cluster -modify - -# tag rds cluster test -tag - -[all:vars] -ansible_connection=local -ansible_python_interpreter="{{ ansible_playbook_python }}" diff --git a/tests/integration/targets/rds_cluster/main.yml b/tests/integration/targets/rds_cluster/main.yml deleted file mode 100644 index 2674f426818..00000000000 --- a/tests/integration/targets/rds_cluster/main.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Beware: most of our tests here are run in parallel. -# To add new tests you'll need to add a new host to the inventory and a matching -# '{{ inventory_hostname }}'.yml file in roles/rds_cluster/tasks/ - -- hosts: all - gather_facts: no - strategy: free - serial: 6 - roles: - - rds_cluster diff --git a/tests/integration/targets/rds_cluster/meta/main.yml b/tests/integration/targets/rds_cluster/meta/main.yml deleted file mode 100644 index 32cf5dda7ed..00000000000 --- a/tests/integration/targets/rds_cluster/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ -dependencies: [] diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/meta/main.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/meta/main.yml deleted file mode 100644 index 73b314ff7c7..00000000000 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/meta/main.yml +++ /dev/null @@ -1 +0,0 @@ ---- \ No newline at end of file diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/main.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/main.yml deleted file mode 100644 index 55f8a551e02..00000000000 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/main.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: rds_cluster integration tests - module_defaults: - group/aws: - region: '{{ aws_region }}' - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' - - block: - - include: ./test_{{ inventory_hostname }}.yml diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/vars/main.yml b/tests/integration/targets/rds_cluster/roles/rds_cluster/vars/main.yml deleted file mode 100644 index ed97d539c09..00000000000 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/vars/main.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/tests/integration/targets/rds_cluster/runme.sh b/tests/integration/targets/rds_cluster/runme.sh deleted file mode 100755 index 21720b263e1..00000000000 --- a/tests/integration/targets/rds_cluster/runme.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -# -# Beware: most of our tests here are run in parallel. -# To add new tests you'll need to add a new host to the inventory and a matching -# '{{ inventory_hostname }}'.yml file in roles/rds_cluster/tasks/ - - -set -eux - -export ANSIBLE_ROLES_PATH=../ - -ansible-playbook main.yml -i inventory "$@" diff --git a/tests/integration/targets/rds_cluster/aliases b/tests/integration/targets/rds_cluster_create/aliases similarity index 75% rename from tests/integration/targets/rds_cluster/aliases rename to tests/integration/targets/rds_cluster_create/aliases index 6e9f239e073..281c185522e 100644 --- a/tests/integration/targets/rds_cluster/aliases +++ b/tests/integration/targets/rds_cluster_create/aliases @@ -1,5 +1,4 @@ time=10m - cloud/aws - +rds_cluster rds_cluster_info diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/defaults/main.yml b/tests/integration/targets/rds_cluster_create/defaults/main.yml similarity index 100% rename from tests/integration/targets/rds_cluster/roles/rds_cluster/defaults/main.yml rename to tests/integration/targets/rds_cluster_create/defaults/main.yml diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create.yml b/tests/integration/targets/rds_cluster_create/tasks/main.yaml similarity index 94% rename from tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create.yml rename to tests/integration/targets/rds_cluster_create/tasks/main.yaml index 54b3143ffd4..ce507cb8e68 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create.yml +++ b/tests/integration/targets/rds_cluster_create/tasks/main.yaml @@ -1,4 +1,10 @@ -- block: +- module_defaults: + group/aws: + region: '{{ aws_region }}' + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + block: - name: Ensure the resource doesn't exist rds_cluster: id: '{{ cluster_id }}' diff --git a/tests/integration/targets/rds_cluster_create_sgs/aliases b/tests/integration/targets/rds_cluster_create_sgs/aliases new file mode 100644 index 00000000000..281c185522e --- /dev/null +++ b/tests/integration/targets/rds_cluster_create_sgs/aliases @@ -0,0 +1,4 @@ +time=10m +cloud/aws +rds_cluster +rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_create_sgs/defaults/main.yml b/tests/integration/targets/rds_cluster_create_sgs/defaults/main.yml new file mode 100644 index 00000000000..173425336e8 --- /dev/null +++ b/tests/integration/targets/rds_cluster_create_sgs/defaults/main.yml @@ -0,0 +1,37 @@ +# defaults file for rds_cluster + +# Create cluster +cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix + }} +username: testrdsusername +password: test-rds_password +engine: aurora +port: 3306 +tags_create: + Name: ansible-test-cluster-{{ tiny_prefix }} + Created_By: Ansible_rds_cluster_integration_test + +# Modify cluster +new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new +new_port: 1155 +new_password: test-rds_password-new +new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new + +# Tag cluster +tags_patch: + Name: '{{ tiny_prefix }}-new' + Created_by: Ansible rds_cluster integration tests + +# Create cluster in a VPC +vpc_name: ansible-test-vpc-{{ tiny_prefix }} +vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 +subnets: +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} + +security_groups: +- '{{ tiny_prefix }}-sg-1' +- '{{ tiny_prefix }}-sg-2' +- '{{ tiny_prefix }}-sg-3' diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create_sgs.yml b/tests/integration/targets/rds_cluster_create_sgs/tasks/main.yaml similarity index 97% rename from tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create_sgs.yml rename to tests/integration/targets/rds_cluster_create_sgs/tasks/main.yaml index c2479e112e8..996bc6c1481 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_create_sgs.yml +++ b/tests/integration/targets/rds_cluster_create_sgs/tasks/main.yaml @@ -1,4 +1,10 @@ -- block: +- module_defaults: + group/aws: + region: '{{ aws_region }}' + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + block: - name: Ensure the resource doesn't exist rds_cluster: id: '{{ cluster_id }}' diff --git a/tests/integration/targets/rds_cluster_modify/aliases b/tests/integration/targets/rds_cluster_modify/aliases new file mode 100644 index 00000000000..281c185522e --- /dev/null +++ b/tests/integration/targets/rds_cluster_modify/aliases @@ -0,0 +1,4 @@ +time=10m +cloud/aws +rds_cluster +rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_modify/defaults/main.yml b/tests/integration/targets/rds_cluster_modify/defaults/main.yml new file mode 100644 index 00000000000..173425336e8 --- /dev/null +++ b/tests/integration/targets/rds_cluster_modify/defaults/main.yml @@ -0,0 +1,37 @@ +# defaults file for rds_cluster + +# Create cluster +cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix + }} +username: testrdsusername +password: test-rds_password +engine: aurora +port: 3306 +tags_create: + Name: ansible-test-cluster-{{ tiny_prefix }} + Created_By: Ansible_rds_cluster_integration_test + +# Modify cluster +new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new +new_port: 1155 +new_password: test-rds_password-new +new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new + +# Tag cluster +tags_patch: + Name: '{{ tiny_prefix }}-new' + Created_by: Ansible rds_cluster integration tests + +# Create cluster in a VPC +vpc_name: ansible-test-vpc-{{ tiny_prefix }} +vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 +subnets: +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} + +security_groups: +- '{{ tiny_prefix }}-sg-1' +- '{{ tiny_prefix }}-sg-2' +- '{{ tiny_prefix }}-sg-3' diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_modify.yml b/tests/integration/targets/rds_cluster_modify/tasks/main.yaml similarity index 98% rename from tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_modify.yml rename to tests/integration/targets/rds_cluster_modify/tasks/main.yaml index cfec27ab554..428bb4d450a 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_modify.yml +++ b/tests/integration/targets/rds_cluster_modify/tasks/main.yaml @@ -1,4 +1,10 @@ -- block: +- module_defaults: + group/aws: + region: '{{ aws_region }}' + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + block: - name: Ensure the resource doesn't exist rds_cluster: id: '{{ cluster_id }}' diff --git a/tests/integration/targets/rds_cluster_promote/aliases b/tests/integration/targets/rds_cluster_promote/aliases new file mode 100644 index 00000000000..af9d1ba866b --- /dev/null +++ b/tests/integration/targets/rds_cluster_promote/aliases @@ -0,0 +1,7 @@ +# TODO: Cannot be tested in the CI because: +# An error occurred (InvalidParameterValue) when calling the CreateDBCluster operation: Replication from cluster in s +disabled +time=10m +cloud/aws +rds_cluster +rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_promote/defaults/main.yml b/tests/integration/targets/rds_cluster_promote/defaults/main.yml new file mode 100644 index 00000000000..173425336e8 --- /dev/null +++ b/tests/integration/targets/rds_cluster_promote/defaults/main.yml @@ -0,0 +1,37 @@ +# defaults file for rds_cluster + +# Create cluster +cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix + }} +username: testrdsusername +password: test-rds_password +engine: aurora +port: 3306 +tags_create: + Name: ansible-test-cluster-{{ tiny_prefix }} + Created_By: Ansible_rds_cluster_integration_test + +# Modify cluster +new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new +new_port: 1155 +new_password: test-rds_password-new +new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new + +# Tag cluster +tags_patch: + Name: '{{ tiny_prefix }}-new' + Created_by: Ansible rds_cluster integration tests + +# Create cluster in a VPC +vpc_name: ansible-test-vpc-{{ tiny_prefix }} +vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 +subnets: +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} + +security_groups: +- '{{ tiny_prefix }}-sg-1' +- '{{ tiny_prefix }}-sg-2' +- '{{ tiny_prefix }}-sg-3' diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_promote.yml b/tests/integration/targets/rds_cluster_promote/tasks/main.yaml similarity index 96% rename from tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_promote.yml rename to tests/integration/targets/rds_cluster_promote/tasks/main.yaml index 8443063add8..1d57aac5e63 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_promote.yml +++ b/tests/integration/targets/rds_cluster_promote/tasks/main.yaml @@ -1,4 +1,10 @@ -- block: +- module_defaults: + group/aws: + region: '{{ aws_region }}' + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + block: - name: Ensure the resource doesn't exist rds_cluster: id: '{{ cluster_id }}' diff --git a/tests/integration/targets/rds_cluster_restore/aliases b/tests/integration/targets/rds_cluster_restore/aliases new file mode 100644 index 00000000000..281c185522e --- /dev/null +++ b/tests/integration/targets/rds_cluster_restore/aliases @@ -0,0 +1,4 @@ +time=10m +cloud/aws +rds_cluster +rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_restore/defaults/main.yml b/tests/integration/targets/rds_cluster_restore/defaults/main.yml new file mode 100644 index 00000000000..173425336e8 --- /dev/null +++ b/tests/integration/targets/rds_cluster_restore/defaults/main.yml @@ -0,0 +1,37 @@ +# defaults file for rds_cluster + +# Create cluster +cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix + }} +username: testrdsusername +password: test-rds_password +engine: aurora +port: 3306 +tags_create: + Name: ansible-test-cluster-{{ tiny_prefix }} + Created_By: Ansible_rds_cluster_integration_test + +# Modify cluster +new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new +new_port: 1155 +new_password: test-rds_password-new +new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new + +# Tag cluster +tags_patch: + Name: '{{ tiny_prefix }}-new' + Created_by: Ansible rds_cluster integration tests + +# Create cluster in a VPC +vpc_name: ansible-test-vpc-{{ tiny_prefix }} +vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 +subnets: +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} + +security_groups: +- '{{ tiny_prefix }}-sg-1' +- '{{ tiny_prefix }}-sg-2' +- '{{ tiny_prefix }}-sg-3' diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_restore.yml b/tests/integration/targets/rds_cluster_restore/tasks/main.yaml similarity index 97% rename from tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_restore.yml rename to tests/integration/targets/rds_cluster_restore/tasks/main.yaml index b991a457baf..b1934f3223b 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_restore.yml +++ b/tests/integration/targets/rds_cluster_restore/tasks/main.yaml @@ -1,4 +1,10 @@ -- block: +- module_defaults: + group/aws: + region: '{{ aws_region }}' + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + block: - name: Ensure the resource doesn't exist rds_cluster: id: '{{ cluster_id }}' diff --git a/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml b/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml index a105044d9ca..dc46e29de7d 100644 --- a/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml +++ b/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml @@ -7,7 +7,6 @@ security_token: "{{ security_token | default(omit) }}" collections: - amazon.aws - block: - name: Create a source DB cluster rds_cluster: diff --git a/tests/integration/targets/rds_cluster_tag/aliases b/tests/integration/targets/rds_cluster_tag/aliases new file mode 100644 index 00000000000..281c185522e --- /dev/null +++ b/tests/integration/targets/rds_cluster_tag/aliases @@ -0,0 +1,4 @@ +time=10m +cloud/aws +rds_cluster +rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_tag/defaults/main.yml b/tests/integration/targets/rds_cluster_tag/defaults/main.yml new file mode 100644 index 00000000000..173425336e8 --- /dev/null +++ b/tests/integration/targets/rds_cluster_tag/defaults/main.yml @@ -0,0 +1,37 @@ +# defaults file for rds_cluster + +# Create cluster +cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix + }} +username: testrdsusername +password: test-rds_password +engine: aurora +port: 3306 +tags_create: + Name: ansible-test-cluster-{{ tiny_prefix }} + Created_By: Ansible_rds_cluster_integration_test + +# Modify cluster +new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new +new_port: 1155 +new_password: test-rds_password-new +new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new + +# Tag cluster +tags_patch: + Name: '{{ tiny_prefix }}-new' + Created_by: Ansible rds_cluster integration tests + +# Create cluster in a VPC +vpc_name: ansible-test-vpc-{{ tiny_prefix }} +vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 +subnets: +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} +- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} + +security_groups: +- '{{ tiny_prefix }}-sg-1' +- '{{ tiny_prefix }}-sg-2' +- '{{ tiny_prefix }}-sg-3' diff --git a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_tag.yml b/tests/integration/targets/rds_cluster_tag/tasks/main.yaml similarity index 98% rename from tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_tag.yml rename to tests/integration/targets/rds_cluster_tag/tasks/main.yaml index be0fa3ee385..70d84ada78d 100644 --- a/tests/integration/targets/rds_cluster/roles/rds_cluster/tasks/test_tag.yml +++ b/tests/integration/targets/rds_cluster_tag/tasks/main.yaml @@ -1,4 +1,10 @@ -- block: +- module_defaults: + group/aws: + region: '{{ aws_region }}' + aws_access_key: '{{ aws_access_key }}' + aws_secret_key: '{{ aws_secret_key }}' + security_token: '{{ security_token | default(omit) }}' + block: - name: Ensure the resource doesn't exist rds_cluster: id: '{{ cluster_id }}' From 4cd3bdfa10a2c35afd5731b26f7ed7e27524d5a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Wed, 19 Oct 2022 10:14:36 -0400 Subject: [PATCH 2/7] Update tests/integration/targets/rds_cluster_promote/aliases Co-authored-by: Alina Buzachis --- tests/integration/targets/rds_cluster_promote/aliases | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/rds_cluster_promote/aliases b/tests/integration/targets/rds_cluster_promote/aliases index af9d1ba866b..550073268ed 100644 --- a/tests/integration/targets/rds_cluster_promote/aliases +++ b/tests/integration/targets/rds_cluster_promote/aliases @@ -1,5 +1,5 @@ # TODO: Cannot be tested in the CI because: -# An error occurred (InvalidParameterValue) when calling the CreateDBCluster operation: Replication from cluster in s +# An error occurred (InvalidParameterValue) when calling the CreateDBCluster operation: Replication from cluster in same region is not supported disabled time=10m cloud/aws From 6696570d55b2b47784f1c8265edcd39b9ceb8354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Wed, 19 Oct 2022 15:00:46 -0400 Subject: [PATCH 3/7] clean up the defaults/main.yml files (Alina) --- .../rds_cluster_create/defaults/main.yml | 28 +---------------- .../rds_cluster_create_sgs/defaults/main.yml | 17 +--------- .../rds_cluster_modify/defaults/main.yml | 25 +-------------- .../rds_cluster_promote/defaults/main.yml | 31 +------------------ .../rds_cluster_restore/defaults/main.yml | 31 +------------------ .../targets/rds_cluster_tag/defaults/main.yml | 23 +------------- 6 files changed, 6 insertions(+), 149 deletions(-) diff --git a/tests/integration/targets/rds_cluster_create/defaults/main.yml b/tests/integration/targets/rds_cluster_create/defaults/main.yml index 173425336e8..bd2dbf8c39a 100644 --- a/tests/integration/targets/rds_cluster_create/defaults/main.yml +++ b/tests/integration/targets/rds_cluster_create/defaults/main.yml @@ -1,8 +1,7 @@ # defaults file for rds_cluster # Create cluster -cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix - }} +cluster_id: ansible-test-cluster-{{ tiny_prefix }} username: testrdsusername password: test-rds_password engine: aurora @@ -10,28 +9,3 @@ port: 3306 tags_create: Name: ansible-test-cluster-{{ tiny_prefix }} Created_By: Ansible_rds_cluster_integration_test - -# Modify cluster -new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new -new_port: 1155 -new_password: test-rds_password-new -new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new - -# Tag cluster -tags_patch: - Name: '{{ tiny_prefix }}-new' - Created_by: Ansible rds_cluster integration tests - -# Create cluster in a VPC -vpc_name: ansible-test-vpc-{{ tiny_prefix }} -vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 -subnets: -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} - -security_groups: -- '{{ tiny_prefix }}-sg-1' -- '{{ tiny_prefix }}-sg-2' -- '{{ tiny_prefix }}-sg-3' diff --git a/tests/integration/targets/rds_cluster_create_sgs/defaults/main.yml b/tests/integration/targets/rds_cluster_create_sgs/defaults/main.yml index 173425336e8..a773a635f7a 100644 --- a/tests/integration/targets/rds_cluster_create_sgs/defaults/main.yml +++ b/tests/integration/targets/rds_cluster_create_sgs/defaults/main.yml @@ -1,26 +1,11 @@ # defaults file for rds_cluster # Create cluster -cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix - }} +cluster_id: ansible-test-cluster-{{ tiny_prefix }} username: testrdsusername password: test-rds_password engine: aurora port: 3306 -tags_create: - Name: ansible-test-cluster-{{ tiny_prefix }} - Created_By: Ansible_rds_cluster_integration_test - -# Modify cluster -new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new -new_port: 1155 -new_password: test-rds_password-new -new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new - -# Tag cluster -tags_patch: - Name: '{{ tiny_prefix }}-new' - Created_by: Ansible rds_cluster integration tests # Create cluster in a VPC vpc_name: ansible-test-vpc-{{ tiny_prefix }} diff --git a/tests/integration/targets/rds_cluster_modify/defaults/main.yml b/tests/integration/targets/rds_cluster_modify/defaults/main.yml index 173425336e8..073f7a4c000 100644 --- a/tests/integration/targets/rds_cluster_modify/defaults/main.yml +++ b/tests/integration/targets/rds_cluster_modify/defaults/main.yml @@ -1,37 +1,14 @@ # defaults file for rds_cluster # Create cluster -cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix - }} +cluster_id: ansible-test-cluster-{{ tiny_prefix }} username: testrdsusername password: test-rds_password engine: aurora port: 3306 -tags_create: - Name: ansible-test-cluster-{{ tiny_prefix }} - Created_By: Ansible_rds_cluster_integration_test # Modify cluster new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new new_port: 1155 new_password: test-rds_password-new new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new - -# Tag cluster -tags_patch: - Name: '{{ tiny_prefix }}-new' - Created_by: Ansible rds_cluster integration tests - -# Create cluster in a VPC -vpc_name: ansible-test-vpc-{{ tiny_prefix }} -vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 -subnets: -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} - -security_groups: -- '{{ tiny_prefix }}-sg-1' -- '{{ tiny_prefix }}-sg-2' -- '{{ tiny_prefix }}-sg-3' diff --git a/tests/integration/targets/rds_cluster_promote/defaults/main.yml b/tests/integration/targets/rds_cluster_promote/defaults/main.yml index 173425336e8..3d0bd924ea7 100644 --- a/tests/integration/targets/rds_cluster_promote/defaults/main.yml +++ b/tests/integration/targets/rds_cluster_promote/defaults/main.yml @@ -1,37 +1,8 @@ # defaults file for rds_cluster # Create cluster -cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix - }} +cluster_id: ansible-test-cluster-{{ tiny_prefix }} username: testrdsusername password: test-rds_password engine: aurora port: 3306 -tags_create: - Name: ansible-test-cluster-{{ tiny_prefix }} - Created_By: Ansible_rds_cluster_integration_test - -# Modify cluster -new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new -new_port: 1155 -new_password: test-rds_password-new -new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new - -# Tag cluster -tags_patch: - Name: '{{ tiny_prefix }}-new' - Created_by: Ansible rds_cluster integration tests - -# Create cluster in a VPC -vpc_name: ansible-test-vpc-{{ tiny_prefix }} -vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 -subnets: -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} - -security_groups: -- '{{ tiny_prefix }}-sg-1' -- '{{ tiny_prefix }}-sg-2' -- '{{ tiny_prefix }}-sg-3' diff --git a/tests/integration/targets/rds_cluster_restore/defaults/main.yml b/tests/integration/targets/rds_cluster_restore/defaults/main.yml index 173425336e8..3d0bd924ea7 100644 --- a/tests/integration/targets/rds_cluster_restore/defaults/main.yml +++ b/tests/integration/targets/rds_cluster_restore/defaults/main.yml @@ -1,37 +1,8 @@ # defaults file for rds_cluster # Create cluster -cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix - }} +cluster_id: ansible-test-cluster-{{ tiny_prefix }} username: testrdsusername password: test-rds_password engine: aurora port: 3306 -tags_create: - Name: ansible-test-cluster-{{ tiny_prefix }} - Created_By: Ansible_rds_cluster_integration_test - -# Modify cluster -new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new -new_port: 1155 -new_password: test-rds_password-new -new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new - -# Tag cluster -tags_patch: - Name: '{{ tiny_prefix }}-new' - Created_by: Ansible rds_cluster integration tests - -# Create cluster in a VPC -vpc_name: ansible-test-vpc-{{ tiny_prefix }} -vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 -subnets: -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} - -security_groups: -- '{{ tiny_prefix }}-sg-1' -- '{{ tiny_prefix }}-sg-2' -- '{{ tiny_prefix }}-sg-3' diff --git a/tests/integration/targets/rds_cluster_tag/defaults/main.yml b/tests/integration/targets/rds_cluster_tag/defaults/main.yml index 173425336e8..86c588b5d74 100644 --- a/tests/integration/targets/rds_cluster_tag/defaults/main.yml +++ b/tests/integration/targets/rds_cluster_tag/defaults/main.yml @@ -1,8 +1,7 @@ # defaults file for rds_cluster # Create cluster -cluster_id: ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix - }} +cluster_id: ansible-test-cluster-{{ tiny_prefix }} username: testrdsusername password: test-rds_password engine: aurora @@ -11,27 +10,7 @@ tags_create: Name: ansible-test-cluster-{{ tiny_prefix }} Created_By: Ansible_rds_cluster_integration_test -# Modify cluster -new_cluster_id: ansible-test-cluster-{{ tiny_prefix }}-new -new_port: 1155 -new_password: test-rds_password-new -new_db_parameter_group_name: ansible-test-db-parameter-group-{{ tiny_prefix }}-new - # Tag cluster tags_patch: Name: '{{ tiny_prefix }}-new' Created_by: Ansible rds_cluster integration tests - -# Create cluster in a VPC -vpc_name: ansible-test-vpc-{{ tiny_prefix }} -vpc_cidr: 10.{{ 256 | random(seed=tiny_prefix) }}.0.0/16 -subnets: -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.1.0/24', zone: '{{ aws_region }}a'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.2.0/24', zone: '{{ aws_region }}b'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.3.0/24', zone: '{{ aws_region }}c'} -- {cidr: '10.{{ 256 | random(seed=tiny_prefix) }}.4.0/24', zone: '{{ aws_region }}d'} - -security_groups: -- '{{ tiny_prefix }}-sg-1' -- '{{ tiny_prefix }}-sg-2' -- '{{ tiny_prefix }}-sg-3' From bf5199ca13ef19686e22b8cff307466cea6c80f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Wed, 26 Oct 2022 15:39:56 -0400 Subject: [PATCH 4/7] increase the timeout to 20m --- tests/integration/targets/rds_cluster_create/aliases | 2 +- tests/integration/targets/rds_cluster_create_sgs/aliases | 2 +- tests/integration/targets/rds_cluster_modify/aliases | 2 +- tests/integration/targets/rds_cluster_promote/aliases | 2 +- tests/integration/targets/rds_cluster_restore/aliases | 2 +- tests/integration/targets/rds_cluster_tag/aliases | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/integration/targets/rds_cluster_create/aliases b/tests/integration/targets/rds_cluster_create/aliases index 281c185522e..7896bb85374 100644 --- a/tests/integration/targets/rds_cluster_create/aliases +++ b/tests/integration/targets/rds_cluster_create/aliases @@ -1,4 +1,4 @@ -time=10m +time=20m cloud/aws rds_cluster rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_create_sgs/aliases b/tests/integration/targets/rds_cluster_create_sgs/aliases index 281c185522e..7896bb85374 100644 --- a/tests/integration/targets/rds_cluster_create_sgs/aliases +++ b/tests/integration/targets/rds_cluster_create_sgs/aliases @@ -1,4 +1,4 @@ -time=10m +time=20m cloud/aws rds_cluster rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_modify/aliases b/tests/integration/targets/rds_cluster_modify/aliases index 281c185522e..7896bb85374 100644 --- a/tests/integration/targets/rds_cluster_modify/aliases +++ b/tests/integration/targets/rds_cluster_modify/aliases @@ -1,4 +1,4 @@ -time=10m +time=20m cloud/aws rds_cluster rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_promote/aliases b/tests/integration/targets/rds_cluster_promote/aliases index 550073268ed..dd7b70052c6 100644 --- a/tests/integration/targets/rds_cluster_promote/aliases +++ b/tests/integration/targets/rds_cluster_promote/aliases @@ -1,7 +1,7 @@ # TODO: Cannot be tested in the CI because: # An error occurred (InvalidParameterValue) when calling the CreateDBCluster operation: Replication from cluster in same region is not supported disabled -time=10m +time=20m cloud/aws rds_cluster rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_restore/aliases b/tests/integration/targets/rds_cluster_restore/aliases index 281c185522e..7896bb85374 100644 --- a/tests/integration/targets/rds_cluster_restore/aliases +++ b/tests/integration/targets/rds_cluster_restore/aliases @@ -1,4 +1,4 @@ -time=10m +time=20m cloud/aws rds_cluster rds_cluster_info diff --git a/tests/integration/targets/rds_cluster_tag/aliases b/tests/integration/targets/rds_cluster_tag/aliases index 281c185522e..7896bb85374 100644 --- a/tests/integration/targets/rds_cluster_tag/aliases +++ b/tests/integration/targets/rds_cluster_tag/aliases @@ -1,4 +1,4 @@ -time=10m +time=20m cloud/aws rds_cluster rds_cluster_info From a55c98afbcea7c87328ebf5ecc927f008de3b508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Thu, 27 Oct 2022 10:48:07 -0400 Subject: [PATCH 5/7] aurora: serverless is now the default engine_mode --- .../targets/rds_cluster_modify/tasks/main.yaml | 10 +++++----- .../targets/rds_cluster_snapshot/tasks/main.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/integration/targets/rds_cluster_modify/tasks/main.yaml b/tests/integration/targets/rds_cluster_modify/tasks/main.yaml index 428bb4d450a..257b11b8334 100644 --- a/tests/integration/targets/rds_cluster_modify/tasks/main.yaml +++ b/tests/integration/targets/rds_cluster_modify/tasks/main.yaml @@ -49,7 +49,7 @@ - "'engine' in _result_create_source_db_cluster" - _result_create_source_db_cluster.engine == "aurora-mysql" - "'engine_mode' in _result_create_source_db_cluster" - - _result_create_source_db_cluster.engine_mode == "provisioned" + - _result_create_source_db_cluster.engine_mode == "serverless" - "'engine_version' in _result_create_source_db_cluster" - "'master_username' in _result_create_source_db_cluster" - _result_create_source_db_cluster.master_username == "{{ username }}" @@ -84,7 +84,7 @@ - "'engine' in _result_modify_password" - _result_modify_password.engine == "aurora-mysql" - "'engine_mode' in _result_modify_password" - - _result_modify_password.engine_mode == "provisioned" + - _result_modify_password.engine_mode == "serverless" - "'engine_version' in _result_modify_password" - "'master_username' in _result_modify_password" - _result_modify_password.master_username == "{{ username }}" @@ -117,7 +117,7 @@ - "'engine' in _result_modify_port" - _result_modify_port.engine == "aurora-mysql" - "'engine_mode' in _result_modify_port" - - _result_modify_port.engine_mode == "provisioned" + - _result_modify_port.engine_mode == "serverless" - "'engine_version' in _result_modify_port" - "'master_username' in _result_modify_port" - _result_modify_port.master_username == "{{ username }}" @@ -152,7 +152,7 @@ - "'engine' in _result_modify_id" - _result_modify_id.engine == "aurora-mysql" - "'engine_mode' in _result_modify_id" - - _result_modify_id.engine_mode == "provisioned" + - _result_modify_id.engine_mode == "serverless" - "'engine_version' in _result_modify_id" - "'master_username' in _result_modify_id" - _result_modify_id.master_username == "{{ username }}" @@ -211,7 +211,7 @@ - "'engine' in _result_modify_db_parameter_group_name" - _result_modify_db_parameter_group_name.engine == "aurora-mysql" - "'engine_mode' in _result_modify_db_parameter_group_name" - - _result_modify_db_parameter_group_name.engine_mode == "provisioned" + - _result_modify_db_parameter_group_name.engine_mode == "serverless" - "'engine_version' in _result_modify_db_parameter_group_name" - "'master_username' in _result_modify_db_parameter_group_name" - _result_modify_db_parameter_group_name.master_username == "{{ username }}" diff --git a/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml b/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml index dc46e29de7d..43f4cebc0b3 100644 --- a/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml +++ b/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml @@ -88,7 +88,7 @@ - "'engine' in _result_cluster_snapshot" - _result_cluster_snapshot.engine == "{{ engine }}" # - "'engine_mode' in _result_cluster_snapshot" - # - _result_cluster_snapshot.engine_mode == "provisioned" + # - _result_cluster_snapshot.engine_mode == "serverless" - "'engine_version' in _result_cluster_snapshot" - "'iam_database_authentication_enabled' in _result_cluster_snapshot" - "'license_model' in _result_cluster_snapshot" @@ -180,7 +180,7 @@ - "'engine' in _result_cluster_snapshot" - _result_cluster_snapshot.engine == "{{ engine }}" # - "'engine_mode' in _result_cluster_snapshot" - # - _result_cluster_snapshot.engine_mode == "provisioned" + # - _result_cluster_snapshot.engine_mode == "serverless" - "'engine_version' in _result_cluster_snapshot" - "'iam_database_authentication_enabled' in _result_cluster_snapshot" - "'license_model' in _result_cluster_snapshot" @@ -258,7 +258,7 @@ - "'engine' in _result_cluster_snapshot" - _result_cluster_snapshot.engine == "{{ engine }}" # - "'engine_mode' in _result_cluster_snapshot" - # - _result_cluster_snapshot.engine_mode == "provisioned" + # - _result_cluster_snapshot.engine_mode == "serverless" - "'engine_version' in _result_cluster_snapshot" - "'iam_database_authentication_enabled' in _result_cluster_snapshot" - "'license_model' in _result_cluster_snapshot" @@ -313,7 +313,7 @@ - "'engine' in _result_cluster_snapshot" - _result_cluster_snapshot.engine == "{{ engine }}" # - "'engine_mode' in _result_cluster_snapshot" - # - _result_cluster_snapshot.engine_mode == "provisioned" + # - _result_cluster_snapshot.engine_mode == "serverless" - "'engine_version' in _result_cluster_snapshot" - "'iam_database_authentication_enabled' in _result_cluster_snapshot" - "'license_model' in _result_cluster_snapshot" @@ -353,7 +353,7 @@ - "'engine' in _result_cluster_snapshot" - _result_cluster_snapshot.engine == "{{ engine }}" # - "'engine_mode' in _result_cluster_snapshot" - # - _result_cluster_snapshot.engine_mode == "provisioned" + # - _result_cluster_snapshot.engine_mode == "serverless" - "'engine_version' in _result_cluster_snapshot" - "'iam_database_authentication_enabled' in _result_cluster_snapshot" - "'license_model' in _result_cluster_snapshot" From a86b88a325fdd46f41dbab03125555ad5a665a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Thu, 27 Oct 2022 13:09:09 -0400 Subject: [PATCH 6/7] rds_cluster_tag needs new_password variable --- tests/integration/targets/rds_cluster_tag/defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/targets/rds_cluster_tag/defaults/main.yml b/tests/integration/targets/rds_cluster_tag/defaults/main.yml index 86c588b5d74..4469db9eb81 100644 --- a/tests/integration/targets/rds_cluster_tag/defaults/main.yml +++ b/tests/integration/targets/rds_cluster_tag/defaults/main.yml @@ -9,6 +9,7 @@ port: 3306 tags_create: Name: ansible-test-cluster-{{ tiny_prefix }} Created_By: Ansible_rds_cluster_integration_test +new_password: test-rds_password-new # Tag cluster tags_patch: From aaa833663fca3fb5b2cde1df2aac177f21214f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Thu, 27 Oct 2022 16:00:34 -0400 Subject: [PATCH 7/7] rds_cluster_modify: serverless -> provisioned --- .../targets/rds_cluster_modify/tasks/main.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/targets/rds_cluster_modify/tasks/main.yaml b/tests/integration/targets/rds_cluster_modify/tasks/main.yaml index 257b11b8334..428bb4d450a 100644 --- a/tests/integration/targets/rds_cluster_modify/tasks/main.yaml +++ b/tests/integration/targets/rds_cluster_modify/tasks/main.yaml @@ -49,7 +49,7 @@ - "'engine' in _result_create_source_db_cluster" - _result_create_source_db_cluster.engine == "aurora-mysql" - "'engine_mode' in _result_create_source_db_cluster" - - _result_create_source_db_cluster.engine_mode == "serverless" + - _result_create_source_db_cluster.engine_mode == "provisioned" - "'engine_version' in _result_create_source_db_cluster" - "'master_username' in _result_create_source_db_cluster" - _result_create_source_db_cluster.master_username == "{{ username }}" @@ -84,7 +84,7 @@ - "'engine' in _result_modify_password" - _result_modify_password.engine == "aurora-mysql" - "'engine_mode' in _result_modify_password" - - _result_modify_password.engine_mode == "serverless" + - _result_modify_password.engine_mode == "provisioned" - "'engine_version' in _result_modify_password" - "'master_username' in _result_modify_password" - _result_modify_password.master_username == "{{ username }}" @@ -117,7 +117,7 @@ - "'engine' in _result_modify_port" - _result_modify_port.engine == "aurora-mysql" - "'engine_mode' in _result_modify_port" - - _result_modify_port.engine_mode == "serverless" + - _result_modify_port.engine_mode == "provisioned" - "'engine_version' in _result_modify_port" - "'master_username' in _result_modify_port" - _result_modify_port.master_username == "{{ username }}" @@ -152,7 +152,7 @@ - "'engine' in _result_modify_id" - _result_modify_id.engine == "aurora-mysql" - "'engine_mode' in _result_modify_id" - - _result_modify_id.engine_mode == "serverless" + - _result_modify_id.engine_mode == "provisioned" - "'engine_version' in _result_modify_id" - "'master_username' in _result_modify_id" - _result_modify_id.master_username == "{{ username }}" @@ -211,7 +211,7 @@ - "'engine' in _result_modify_db_parameter_group_name" - _result_modify_db_parameter_group_name.engine == "aurora-mysql" - "'engine_mode' in _result_modify_db_parameter_group_name" - - _result_modify_db_parameter_group_name.engine_mode == "serverless" + - _result_modify_db_parameter_group_name.engine_mode == "provisioned" - "'engine_version' in _result_modify_db_parameter_group_name" - "'master_username' in _result_modify_db_parameter_group_name" - _result_modify_db_parameter_group_name.master_username == "{{ username }}"