mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-30 03:14:40 +00:00
[backport/2.1] molecule to ansible-test CI migration (#398)
integration testing migration from molecule to ansible-test
This commit is contained in:
2
tests/integration/targets/k8s_cluster_info/aliases
Normal file
2
tests/integration/targets/k8s_cluster_info/aliases
Normal file
@@ -0,0 +1,2 @@
|
||||
k8s_cluster_info
|
||||
time=6
|
||||
24
tests/integration/targets/k8s_cluster_info/tasks/main.yml
Normal file
24
tests/integration/targets/k8s_cluster_info/tasks/main.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Get Information about All APIs
|
||||
k8s_cluster_info:
|
||||
register: api_details
|
||||
|
||||
- name: Print all APIs for debugging
|
||||
debug:
|
||||
msg: "{{ api_details.apis }}"
|
||||
|
||||
- name: Get core API version
|
||||
set_fact:
|
||||
crd: "{{ api_details.apis['apiextensions.k8s.io/v1'] }}"
|
||||
host: "{{ api_details.connection['host'] }}"
|
||||
client_version: "{{ api_details.version['client'] }}"
|
||||
|
||||
- name: Check if all APIs are present
|
||||
assert:
|
||||
that:
|
||||
- api_details.apis is defined
|
||||
- api_details.apis.v1.Secret is defined
|
||||
- api_details.apis.v1.Service is defined
|
||||
- crd is defined
|
||||
- host is defined
|
||||
- client_version is defined
|
||||
Reference in New Issue
Block a user