Skip to content

Commit

Permalink
Allow a little flexibility for deletion times
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Feb 7, 2021
1 parent 807d178 commit 28c86c7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/integration/targets/aws_kms/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,9 @@
that:
- delete_kms.key_state == "PendingDeletion"
- delete_kms.changed
- (( deletion_time | to_datetime ) - ( now_time | to_datetime )).days == 30
# Times won't be perfect, allow a 24 hour window
- (( deletion_time | to_datetime ) - ( now_time | to_datetime )).days <= 30
- (( deletion_time | to_datetime ) - ( now_time | to_datetime )).days >= 29

- name: re-delete the key
aws_kms:
Expand Down Expand Up @@ -486,7 +488,9 @@
that:
- delete_kms.key_state == "PendingDeletion"
- delete_kms.changed
- (( deletion_time | to_datetime ) - ( now_time | to_datetime )).days == 7
# Times won't be perfect, allow a 24 hour window
- (( deletion_time | to_datetime ) - ( now_time | to_datetime )).days <= 7
- (( deletion_time | to_datetime ) - ( now_time | to_datetime )).days >= 6

always:
# ============================================================
Expand Down

0 comments on commit 28c86c7

Please sign in to comment.