diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:22:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-26 06:22:20 +0000 |
commit | 18bd2207b6c1977e99a93673a7be099e23f0f547 (patch) | |
tree | 40fd9e5913462a88be6ba24be6953383c5b39874 /ansible_collections/containers/podman/tests/unit/plugins | |
parent | Releasing progress-linux version 10.0.1+dfsg-1~progress7.99u1. (diff) | |
download | ansible-18bd2207b6c1977e99a93673a7be099e23f0f547.tar.xz ansible-18bd2207b6c1977e99a93673a7be099e23f0f547.zip |
Merging upstream version 10.1.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/containers/podman/tests/unit/plugins')
-rw-r--r-- | ansible_collections/containers/podman/tests/unit/plugins/modules/test_container_lib.py | 72 |
1 files changed, 70 insertions, 2 deletions
diff --git a/ansible_collections/containers/podman/tests/unit/plugins/modules/test_container_lib.py b/ansible_collections/containers/podman/tests/unit/plugins/modules/test_container_lib.py index 20dd4e66c..ea336419a 100644 --- a/ansible_collections/containers/podman/tests/unit/plugins/modules/test_container_lib.py +++ b/ansible_collections/containers/podman/tests/unit/plugins/modules/test_container_lib.py @@ -66,7 +66,15 @@ def test_container_add_params(test_input, expected): [ None, # module {"conmon_pidfile": "bbb"}, # module params - {"conmonpidfile": "ccc"}, # container info + {"conmonpidfile": "ccc", + "config": { + "createcommand": [ + "podman", + "create", + "--conmon-pidfile=ccc", + "testcont", + ]} + }, # container info {}, # image info "4.1.1", # podman version ], @@ -76,7 +84,67 @@ def test_container_add_params(test_input, expected): [ None, # module {"conmon_pidfile": None}, # module params - {"conmonpidfile": "ccc"}, # container info + {"conmonpidfile": "ccc", + "config": { + "createcommand": [ + "podman", + "create", + "--conmon-pidfile=ccc", + "testcont", + ]} + }, # container info + {}, # image info + "4.1.1", # podman version + ], + True, + ), + ( + [ + None, # module + {"conmon_pidfile": None}, # module params + {"conmonpidfile": None, + "config": { + "createcommand": [ + "podman", + "create", + "testcont", + ]} + }, # container info + {}, # image info + "4.1.1", # podman version + ], + False, + ), + ( + [ + None, # module + {"conmon_pidfile": 'aaa'}, # module params + {"conmonpidfile": None, + "config": { + "createcommand": [ + "podman", + "create", + "testcont", + ]} + }, # container info + {}, # image info + "4.1.1", # podman version + ], + True, + ), + ( + [ + None, # module + {"conmon_pidfile": 'aaa'}, # module params + {"conmonpidfile": 'aaa', + "config": { + "createcommand": [ + "podman", + "create", + "--conmon-pidfile=aaa", + "testcont", + ]} + }, # container info {}, # image info "4.1.1", # podman version ], |