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