Skip to content

Commit

Permalink
cloudfront_distribution: test case for handling added
Browse files Browse the repository at this point in the history
  • Loading branch information
gsimon75 committed May 26, 2023
1 parent 9123094 commit 9784bc6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/integration/targets/cloudfront_distribution/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
- set_fact:
distribution_id: '{{ cf_distribution.id }}'

- name: ensure that default value of 'enabled' is 'true'
assert:
that:
- cf_distribution.changed
- cf_distribution.enabled

- name: ensure that default value of 'ipv6_enabled' is 'false'
assert:
that:
Expand Down Expand Up @@ -359,8 +365,9 @@
wait: true
state: absent

- name: create cloudfront distribution with tags
- name: create cloudfront distribution with tags and as disabled
cloudfront_distribution:
enabled: false
origins:
- domain_name: "{{ resource_prefix }}2.example.com"
id: "{{ resource_prefix }}2.example.com"
Expand All @@ -373,6 +380,12 @@
- set_fact:
distribution_id: '{{ cf_second_distribution.id }}'

- name: ensure that the value of 'enabled' is 'false'
assert:
that:
- cf_second_distribution.changed
- not cf_second_distribution.enabled

- name: ensure tags were set on creation
assert:
that:
Expand Down

0 comments on commit 9784bc6

Please sign in to comment.