1
0
Fork 0
mirror of https://github.com/containers/ansible-podman-collections.git synced 2026-02-04 07:11:49 +00:00

Add another test for volumes (#942)

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
This commit is contained in:
Sergey 2025-06-22 12:25:25 +03:00 committed by GitHub
parent 6ff93e7559
commit f6bd81e820
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -371,13 +371,26 @@
- /tmp/data:/data:U
register: test24
- name: Check test24
- containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
name: test24
image: alpine
state: present
volumes:
- /tmp/data:/data:U
register: test25
- name: Check volumes with selinux relabeling
assert:
that:
- test24 is changed
- >-
(test24.container['Config']['CreateCommand'] is defined and
'/tmp/data:/data:U' in test24.container['Config']['CreateCommand'] | list)
- test25 is not changed
- >-
(test25.container['Config']['CreateCommand'] is defined and
'/tmp/data:/data:U' in test25.container['Config']['CreateCommand'] | list)
- ansible.builtin.file:
path: /tmp/data