Skip to content

Commit

Permalink
Add unittests for volume idempotency
Browse files Browse the repository at this point in the history
Signed-off-by: Sagi Shnaidman <[email protected]>
  • Loading branch information
sshnaidm committed Apr 1, 2023
1 parent d0d51ed commit 796c560
Show file tree
Hide file tree
Showing 4 changed files with 415 additions and 43 deletions.
2 changes: 1 addition & 1 deletion plugins/module_utils/podman/podman_container_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ def prep_volume_for_comp(all_ms):
f = prep_tmpfs_for_comp(cr_com[i + 1])
if f:
before.append(f)
elif v == '--volume':
elif v in ('--volume', '-v'):
f = prep_volume_for_comp(cr_com[i + 1])
if f:
before.append(f)
Expand Down
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ ansible-core
pytest
pytest-forked
pytest-xdist
pytest-mock
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@

- name: check test13
assert:
that: test13 is not changed
that: test13 is changed

- containers.podman.podman_container:
executable: "{{ test_executable | default('podman') }}"
Expand Down
Loading

0 comments on commit 796c560

Please sign in to comment.