Skip to content

Commit

Permalink
add longer waits and run tests in parallel (#1112)
Browse files Browse the repository at this point in the history
aws_kms - stabilize integration tests

SUMMARY
Integration tests for this test suite were failing occasionally due to timing issues when waiting for < 45 seconds after updates.
Increased the wait times to 45 seconds and split into different tests to run in parallel.
Fixes #433
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
aws_kms

Reviewed-by: Jill R <None>
Reviewed-by: Markus Bergholz <[email protected]>
(cherry picked from commit cda4830)
  • Loading branch information
jatorcasso authored and patchback[bot] committed May 7, 2022
1 parent 4bf05ca commit d472fbe
Show file tree
Hide file tree
Showing 13 changed files with 1,507 additions and 941 deletions.
2 changes: 0 additions & 2 deletions tests/integration/targets/aws_kms/defaults/main.yml

This file was deleted.

10 changes: 10 additions & 0 deletions tests/integration/targets/aws_kms/inventory
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# inventory names shortened down to fit resource name length limits
[tests]
states
grants
modify
tagging

[all:vars]
ansible_connection=local
ansible_python_interpreter="{{ ansible_playbook_python }}"
10 changes: 10 additions & 0 deletions tests/integration/targets/aws_kms/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# 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/aws_kms/tasks/

- hosts: all
gather_facts: no
strategy: free
roles:
- aws_kms
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
kms_key_alias: "ansible-test-{{ inventory_hostname | replace('_','-') }}{{ tiny_prefix }}"
13 changes: 13 additions & 0 deletions tests/integration/targets/aws_kms/roles/aws_kms/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: 'aws_kms 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'
Loading

0 comments on commit d472fbe

Please sign in to comment.