Skip to content

Commit

Permalink
tests/acm_certificate: retries a aws_acm_info if needed (#1473)
Browse files Browse the repository at this point in the history
tests/acm_certificate: retries aws_acm_info called when needed

The aws_acm_info may return an empty list if a certificate has just been recreated (race condition). We now retry 3 times until we've got a list.
  • Loading branch information
goneri authored Sep 16, 2022
1 parent 1cd7ceb commit c7510c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/tests-acm_certificate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
trivial:
- "Improve the reliability of cm_certificate integration tests."
4 changes: 4 additions & 0 deletions tests/integration/targets/acm_certificate/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@
tags:
Name: '{{ chained_cert.name }}'
register: check_chain
until: check_chain.certificates|length > 0
retries: 3
- name: check chain of cert we just uploaded
assert:
that:
Expand Down Expand Up @@ -545,6 +547,8 @@
tags:
Name: '{{ chained_cert.name }}'
register: check_chain_2
until: check_chain_2.certificates|length > 0
retries: 3
- name: check chain of cert we just uploaded
assert:
that:
Expand Down

0 comments on commit c7510c2

Please sign in to comment.