Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rds_cluster: split up the test target #1175

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/rds_cluster_split_functional_tests.yaml
Original file line number Diff line number Diff line change
@@ -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)."
23 changes: 0 additions & 23 deletions tests/integration/targets/rds_cluster/inventory

This file was deleted.

10 changes: 0 additions & 10 deletions tests/integration/targets/rds_cluster/main.yml

This file was deleted.

1 change: 0 additions & 1 deletion tests/integration/targets/rds_cluster/meta/main.yml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions tests/integration/targets/rds_cluster/runme.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
time=10m

time=20m
cloud/aws

rds_cluster
rds_cluster_info
11 changes: 11 additions & 0 deletions tests/integration/targets/rds_cluster_create/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# defaults file for rds_cluster

# Create cluster
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
Original file line number Diff line number Diff line change
@@ -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 }}'
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/targets/rds_cluster_create_sgs/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
time=20m
cloud/aws
rds_cluster
rds_cluster_info
Original file line number Diff line number Diff line change
@@ -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
goneri marked this conversation as resolved.
Show resolved Hide resolved
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 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -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 }}'
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/targets/rds_cluster_modify/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
time=20m
cloud/aws
rds_cluster
rds_cluster_info
14 changes: 14 additions & 0 deletions tests/integration/targets/rds_cluster_modify/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# defaults file for rds_cluster

# Create cluster
cluster_id: ansible-test-cluster-{{ tiny_prefix }}
username: testrdsusername
password: test-rds_password
goneri marked this conversation as resolved.
Show resolved Hide resolved
engine: aurora
port: 3306

# 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
Original file line number Diff line number Diff line change
@@ -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 }}'
Expand Down
7 changes: 7 additions & 0 deletions tests/integration/targets/rds_cluster_promote/aliases
Original file line number Diff line number Diff line change
@@ -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 same region is not supported
disabled
time=20m
cloud/aws
rds_cluster
rds_cluster_info
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# defaults file for rds_cluster

# Create cluster
cluster_id: ansible-test-cluster-{{ tiny_prefix }}
username: testrdsusername
password: test-rds_password
goneri marked this conversation as resolved.
Show resolved Hide resolved
engine: aurora
port: 3306
Original file line number Diff line number Diff line change
@@ -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 }}'
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/targets/rds_cluster_restore/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
time=20m
cloud/aws
rds_cluster
rds_cluster_info
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# defaults file for rds_cluster

# Create cluster
cluster_id: ansible-test-cluster-{{ tiny_prefix }}
username: testrdsusername
password: test-rds_password
goneri marked this conversation as resolved.
Show resolved Hide resolved
engine: aurora
port: 3306
Original file line number Diff line number Diff line change
@@ -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 }}'
Expand Down
11 changes: 5 additions & 6 deletions tests/integration/targets/rds_cluster_snapshot/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
security_token: "{{ security_token | default(omit) }}"
collections:
- amazon.aws

block:
- name: Create a source DB cluster
rds_cluster:
Expand Down Expand Up @@ -89,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"
Expand Down Expand Up @@ -181,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"
Expand Down Expand Up @@ -259,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"
Expand Down Expand Up @@ -314,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"
Expand Down Expand Up @@ -354,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"
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/targets/rds_cluster_tag/aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
time=20m
cloud/aws
rds_cluster
rds_cluster_info
17 changes: 17 additions & 0 deletions tests/integration/targets/rds_cluster_tag/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# defaults file for rds_cluster

# Create cluster
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
new_password: test-rds_password-new

# Tag cluster
tags_patch:
Name: '{{ tiny_prefix }}-new'
Created_by: Ansible rds_cluster integration tests
Original file line number Diff line number Diff line change
@@ -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 }}'
Expand Down