Skip to content

Commit f6bd81e

Browse files
authored
Add another test for volumes (#942)
Signed-off-by: Sagi Shnaidman <[email protected]>
1 parent 6ff93e7 commit f6bd81e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/integration/targets/podman_container_idempotency/tasks/idem_volumes.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,26 @@
371371
- /tmp/data:/data:U
372372
register: test24
373373

374-
- name: Check test24
374+
- containers.podman.podman_container:
375+
executable: "{{ test_executable | default('podman') }}"
376+
name: test24
377+
image: alpine
378+
state: present
379+
volumes:
380+
- /tmp/data:/data:U
381+
register: test25
382+
383+
- name: Check volumes with selinux relabeling
375384
assert:
376385
that:
377386
- test24 is changed
378387
- >-
379388
(test24.container['Config']['CreateCommand'] is defined and
380389
'/tmp/data:/data:U' in test24.container['Config']['CreateCommand'] | list)
390+
- test25 is not changed
391+
- >-
392+
(test25.container['Config']['CreateCommand'] is defined and
393+
'/tmp/data:/data:U' in test25.container['Config']['CreateCommand'] | list)
381394
382395
- ansible.builtin.file:
383396
path: /tmp/data

0 commit comments

Comments
 (0)