mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
Integrate the integration test
This commit is contained in:
@@ -326,6 +326,7 @@
|
||||
register: k8s_info_testing6
|
||||
failed_when: not k8s_info_testing6.resources or k8s_info_testing6.resources[0].status.phase != "Active"
|
||||
|
||||
- include_tasks: test_k8s_exec.yml
|
||||
- include_tasks: crd.yml
|
||||
- include_tasks: lists.yml
|
||||
- include_tasks: append_hash.yml
|
||||
|
||||
@@ -2,24 +2,26 @@
|
||||
- vars:
|
||||
ns: k8s-exec
|
||||
pod: sleep-pod
|
||||
pod_def:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ pod }}"
|
||||
namespace: "{{ ns }}"
|
||||
spec:
|
||||
containers:
|
||||
- image: busybox
|
||||
command: ["sleep", "infinity"]
|
||||
|
||||
block:
|
||||
- name: ensure that k8s-log namespace exists
|
||||
- name: Ensure that k8s-log namespace exists
|
||||
k8s:
|
||||
kind: Namespace
|
||||
name: "{{ ns }}"
|
||||
|
||||
- name: Create a pod
|
||||
k8s:
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: "{{ pod }}"
|
||||
namespace: "{{ ns }}"
|
||||
spec:
|
||||
containers:
|
||||
- image: busybox
|
||||
command: ["sleep", "infinity"]
|
||||
definition: "{{ pod_def }}"
|
||||
wait: yes
|
||||
wait_sleep: 1
|
||||
wait_timeout: 30
|
||||
@@ -39,3 +41,9 @@
|
||||
assert:
|
||||
that:
|
||||
- "'nameserver' in output.stdout"
|
||||
|
||||
- name: Cleanup namespace
|
||||
k8s:
|
||||
kind: Namespace
|
||||
name: "{{ ns }}"
|
||||
state: absent
|
||||
|
||||
Reference in New Issue
Block a user