forked from ansible-collections/community.aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ansible-collections#531 from tremble/rds_instance/…
…parallel-tests Run rds_instance tests in parallel (Databases are *slow*) Reviewed-by: https://github.com/apps/ansible-zuul
- Loading branch information
Showing
20 changed files
with
117 additions
and
75 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[tests] | ||
credentials | ||
states | ||
tags | ||
modification | ||
bad_options | ||
processor_features | ||
encryption | ||
final_snapshot | ||
read_replica | ||
vpc_security_groups | ||
restore_instance | ||
snapshot | ||
|
||
# TODO: uncomment after adding rds_cluster module | ||
# aurora | ||
|
||
|
||
[all:vars] | ||
ansible_connection=local | ||
ansible_python_interpreter="{{ ansible_playbook_python }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# 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_instance/tasks/ | ||
|
||
- hosts: all | ||
gather_facts: no | ||
strategy: free | ||
serial: 5 | ||
roles: | ||
- rds_instance |
28 changes: 28 additions & 0 deletions
28
tests/integration/targets/rds_instance/roles/rds_instance/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
instance_id: "{{ resource_prefix }}-{{ inventory_hostname | replace('_','-') }}" | ||
modified_instance_id: "{{ resource_prefix }}-updated" | ||
username: test | ||
password: test12345678 | ||
db_instance_class: db.t3.micro | ||
storage_encrypted_db_instance_class: db.t3.small | ||
modified_db_instance_class: db.t3.medium | ||
allocated_storage: 20 | ||
modified_allocated_storage: 30 | ||
|
||
# For aurora tests | ||
cluster_id: "{{ resource_prefix }}-cluster" | ||
aurora_db_instance_class: db.t3.medium | ||
|
||
# For oracle tests | ||
# Smallest instance that permits modification of the coreCount | ||
oracle_ee_db_instance_class: db.r5.2xlarge | ||
processor_features: | ||
coreCount: 2 | ||
threadsPerCore: 1 | ||
modified_processor_features: | ||
coreCount: 4 | ||
threadsPerCore: 2 | ||
|
||
# For mariadb tests | ||
mariadb_engine_version: 10.3.20 | ||
mariadb_engine_version_2: 10.4.8 |
14 changes: 14 additions & 0 deletions
14
tests/integration/targets/rds_instance/roles/rds_instance/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
- name: 'rds_instance integration tests' | ||
collections: | ||
- amazon.aws | ||
- community.aws | ||
module_defaults: | ||
group/aws: | ||
aws_access_key: '{{ aws_access_key }}' | ||
aws_secret_key: '{{ aws_secret_key }}' | ||
security_token: '{{ security_token | default(omit) }}' | ||
region: '{{ aws_region }}' | ||
block: | ||
- include: './test_{{ inventory_hostname }}.yml' | ||
#- include: ./test_restore_instance.yml # TODO: snapshot, s3 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,4 @@ | |
id: "{{ instance_id }}" | ||
state: absent | ||
skip_final_snapshot: True | ||
ignore_errors: yes | ||
ignore_errors: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
..._instance/tasks/test_restore_instance.yml → ..._instance/tasks/test_restore_instance.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
- block: | ||
# TODO: snapshot, s3 | ||
|
||
- name: Ensure the resource doesn't exist | ||
rds_instance: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/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/ec2_instance/tasks/ | ||
|
||
|
||
set -eux | ||
|
||
export ANSIBLE_ROLES_PATH=../ | ||
|
||
ansible-playbook main.yml -i inventory "$@" |
This file was deleted.
Oops, something went wrong.