Skip to content

Commit

Permalink
rds_cluster: split up the test target
Browse files Browse the repository at this point in the history
Split up the test target to avoid the parallel execution.
  • Loading branch information
goneri committed Oct 17, 2022
1 parent b9ee1f6 commit 9c73c8c
Show file tree
Hide file tree
Showing 26 changed files with 251 additions and 67 deletions.
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

cloud/aws

rds_cluster
rds_cluster_info
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=10m
cloud/aws
rds_cluster
rds_cluster_info
37 changes: 37 additions & 0 deletions tests/integration/targets/rds_cluster_create_sgs/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -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'
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=10m
cloud/aws
rds_cluster
rds_cluster_info
37 changes: 37 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,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'
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 s
disabled
time=10m
cloud/aws
rds_cluster
rds_cluster_info
37 changes: 37 additions & 0 deletions tests/integration/targets/rds_cluster_promote/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -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'
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=10m
cloud/aws
rds_cluster
rds_cluster_info
37 changes: 37 additions & 0 deletions tests/integration/targets/rds_cluster_restore/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -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'
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
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
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=10m
cloud/aws
rds_cluster
rds_cluster_info
37 changes: 37 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,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'
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

0 comments on commit 9c73c8c

Please sign in to comment.