mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
archive - idempotency enhancement for 4.0.0 (#3075)
* Initial Commit
* Comparing with tar file checksums rather than tar header checksums
* Added changelog fragment
* Revert "Comparing with tar file checksums rather than tar header checksums"
This reverts commit bed4b17107
.
* Restricting idempotency tests by format
* Applying review suggestions
This commit is contained in:
parent
6033ce695b
commit
1e466df863
3 changed files with 65 additions and 21 deletions
|
@ -19,12 +19,12 @@
|
|||
format: "{{ format }}"
|
||||
register: file_content_idempotency_after
|
||||
|
||||
# After idempotency fix result will be reliably changed for all formats
|
||||
- name: Assert task status is changed - file content idempotency ({{ format }})
|
||||
assert:
|
||||
that:
|
||||
- file_content_idempotency_after is not changed
|
||||
when: "format in ('tar', 'zip')"
|
||||
- file_content_idempotency_after is changed
|
||||
# Only ``zip`` archives are guaranteed to compare file content checksums rather than header checksums
|
||||
when: "format == 'zip'"
|
||||
|
||||
- name: Remove archive - file content idempotency ({{ format }})
|
||||
file:
|
||||
|
@ -54,12 +54,10 @@
|
|||
format: "{{ format }}"
|
||||
register: file_name_idempotency_after
|
||||
|
||||
# After idempotency fix result will be reliably changed for all formats
|
||||
- name: Check task status - file name idempotency ({{ format }})
|
||||
assert:
|
||||
that:
|
||||
- file_name_idempotency_after is not changed
|
||||
when: "format in ('tar', 'zip')"
|
||||
- file_name_idempotency_after is changed
|
||||
|
||||
- name: Remove archive - file name idempotency ({{ format }})
|
||||
file:
|
||||
|
@ -89,12 +87,12 @@
|
|||
format: "{{ format }}"
|
||||
register: single_file_content_idempotency_after
|
||||
|
||||
# After idempotency fix result will be reliably changed for all formats
|
||||
- name: Assert task status is changed - single file content idempotency ({{ format }})
|
||||
assert:
|
||||
that:
|
||||
- single_file_content_idempotency_after is not changed
|
||||
when: "format in ('tar', 'zip')"
|
||||
- single_file_content_idempotency_after is changed
|
||||
# ``tar`` archives are not guaranteed to identify changes to file content if the file meta properties are unchanged.
|
||||
when: "format != 'tar'"
|
||||
|
||||
- name: Remove archive - single file content idempotency ({{ format }})
|
||||
file:
|
||||
|
@ -125,11 +123,12 @@
|
|||
register: single_file_name_idempotency_after
|
||||
|
||||
|
||||
# After idempotency fix result will be reliably changed for all formats
|
||||
# The gz, bz2, and xz formats do not store the original file name
|
||||
# so it is not possible to identify a change in this scenario.
|
||||
- name: Check task status - single file name idempotency ({{ format }})
|
||||
assert:
|
||||
that:
|
||||
- single_file_name_idempotency_after is not changed
|
||||
- single_file_name_idempotency_after is changed
|
||||
when: "format in ('tar', 'zip')"
|
||||
|
||||
- name: Remove archive - single file name idempotency ({{ format }})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue