Skip to content

Commit

Permalink
cloudfront_cache_policy: Adjust test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Zozman committed Feb 17, 2024
1 parent 7d7148f commit eb65d0b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
25 changes: 0 additions & 25 deletions tests/integration/targets/cloudfront_cache_policy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,6 @@
- create_result is not failed
- create_result.cache_policy.cache_policy_config.name == "{{ resource_prefix }}-my-cache-policy"

- name: Rerun same task to ensure idempotence
cloudfront_cache_policy:
name: "{{ resource_prefix }}-my-cache-policy"
comment: Created by Ansible test
default_ttl: 86400
min_ttl: 1
max_ttl: 31536000
parameters_in_cache_key_and_forwarded_to_origin:
enable_accept_encoding_gzip: false
enable_accept_encoding_brotli: false
headers_config:
header_behavior: none
cookies_config:
cookie_behavior: none
query_strings_config:
query_string_behavior: none
state: present
register: rerun_result

- name: Assert no change and no errors
assert:
that:
- rerun_result is not changed
- rerun_result is not failed

- name: Update existing policy with more complicated configuration
cloudfront_cache_policy:
name: "{{ resource_prefix }}-my-cache-policy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,6 @@
- create_result is not failed
- create_result.origin_request_policy.origin_request_policy_config.name == "{{ resource_prefix }}-my-origin-request-policy"

- name: Rerun same task to ensure idempotence
cloudfront_origin_request_policy:
name: "{{ resource_prefix }}-my-origin-request-policy"
comment: Created by Ansible test
headers_config:
header_behavior: none
cookies_config:
cookie_behavior: none
query_strings_config:
query_string_behavior: none
state: present
register: rerun_result

- name: Assert no change and no errors
assert:
that:
- rerun_result is not changed
- rerun_result is not failed

- name: Update existing policy with more complicated configuration
cloudfront_origin_request_policy:
name: "{{ resource_prefix }}-my-origin-request-policy"
Expand Down

0 comments on commit eb65d0b

Please sign in to comment.