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

Update test case for deleting pod with podman_play

Signed-off-by: nishipy <goodisonev4@gmail.com>
This commit is contained in:
nishipy 2024-03-24 00:17:26 +09:00
parent 742e6add42
commit 4dd95dfb08

View file

@ -110,31 +110,26 @@
- name: Remove pods created by kube play
containers.podman.podman_play:
executable: "{{ test_executable | default('podman') }}"
kube_file: "{{ item }}"
kube_file: /tmp/play3.yaml
state: absent
register: remove_pod
loop:
- /tmp/play1.yaml
- /tmp/play3.yaml
- name: Check if the pod was removed as expected
assert:
that:
- remove_pod is changed
- name: Get deleted pod info
containers.podman.podman_pod_info:
executable: "{{ test_executable | default('podman') }}"
name: "{{ item }}"
loop:
- web-deploy
- web-deploy-pod
- web-deploy-pod-0
- web-deploy-pod-1
- web-deploy-pod-2
name: web-deploy-pod
register: nonexist
- name: Check if the result is as expected
assert:
that:
- item.pods == []
with_items: "{{ nonexist.results }}"
- nonexist.pods == []
always:
- name: Delete all pods leftovers from tests