mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
k8s_log - fix module traceback when resource not found (#493)
k8s_log - fix module traceback when resource not found Depends-on: #495 SUMMARY closes #479 ISSUE TYPE Bugfix Pull Request COMPONENT NAME k8s_log Reviewed-by: Mike Graves <mgraves@redhat.com>
This commit is contained in:
@@ -1,5 +1,18 @@
|
||||
---
|
||||
- block:
|
||||
- name: Retrieve log from unexisting Pod
|
||||
k8s_log:
|
||||
namespace: "{{ test_namespace }}"
|
||||
name: "this_pod_does_exist"
|
||||
ignore_errors: true
|
||||
register: fake_pod
|
||||
|
||||
- name: Assert that task failed with proper message
|
||||
assert:
|
||||
that:
|
||||
- fake_pod is failed
|
||||
- 'fake_pod.msg == "Pod {{ test_namespace }}/this_pod_does_exist not found."'
|
||||
|
||||
- name: create hello-world deployment
|
||||
k8s:
|
||||
wait: yes
|
||||
|
||||
Reference in New Issue
Block a user