mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-07-08 19:49:12 +00:00
test(podman_prune): add idempotency test for system prune
Signed-off-by: Eric Badendiek <eric.badendiek@gmx.de>
This commit is contained in:
parent
d7aadc95eb
commit
4dfea93b91
1 changed files with 15 additions and 0 deletions
|
|
@ -141,6 +141,21 @@
|
|||
# images
|
||||
- image_system_exists.images | length == 0
|
||||
|
||||
# Idempotency - Test "Total reclaimed space: 0B" does not report changed
|
||||
- name: Prune objects
|
||||
containers.podman.podman_prune:
|
||||
system: true
|
||||
|
||||
- name: Prune objects - 2nd time
|
||||
containers.podman.podman_prune:
|
||||
system: true
|
||||
register: podman_prune_result
|
||||
|
||||
- name: Assert that result.changed is false
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- podman_prune_result.system.changed == false
|
||||
|
||||
always:
|
||||
- name: Cleanup
|
||||
ansible.builtin.command: podman system prune -a -f --volumes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue