mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
Adds k8s_raw, openshift_raw tests (#36228)
This commit is contained in:
parent
a1241d99ee
commit
53cfd70b7d
4 changed files with 153 additions and 24 deletions
|
@ -18,7 +18,7 @@
|
|||
- name: Create a service
|
||||
openshift_raw:
|
||||
state: present
|
||||
resource_definition:
|
||||
resource_definition: &svc
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
|
@ -42,13 +42,15 @@
|
|||
debug:
|
||||
var: output
|
||||
|
||||
- name: Delete an existing PVC
|
||||
- name: Create the service again
|
||||
openshift_raw:
|
||||
name: web
|
||||
namespace: testing
|
||||
api: v1
|
||||
kind: persistent_volume_claim
|
||||
state: absent
|
||||
state: present
|
||||
resource_definition: *svc
|
||||
register: output
|
||||
|
||||
- name: Service creation should be idempotent
|
||||
assert:
|
||||
that: not output.changed
|
||||
|
||||
- name: Create PVC
|
||||
openshift_raw:
|
||||
|
@ -70,28 +72,15 @@
|
|||
debug:
|
||||
var: output
|
||||
|
||||
- name: Create PVC
|
||||
- name: Create the PVC again
|
||||
openshift_raw:
|
||||
state: present
|
||||
inline: *pvc
|
||||
register: output
|
||||
|
||||
- name: Show output
|
||||
debug:
|
||||
var: output
|
||||
|
||||
- name: PVC should be idempotent
|
||||
- name: PVC creation should be idempotent
|
||||
assert:
|
||||
that: not output.changed
|
||||
|
||||
- name: Delete an existing deployment config
|
||||
openshift_raw:
|
||||
name: elastic
|
||||
namespace: testing
|
||||
api: v1
|
||||
kind: DeploymentConfig
|
||||
state: absent
|
||||
|
||||
- name: Create deployment config
|
||||
openshift_raw:
|
||||
state: present
|
||||
|
@ -121,7 +110,7 @@
|
|||
volumes:
|
||||
- name: elastic-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: elastic-volume
|
||||
claimName: elastic-volume
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Rolling
|
||||
|
@ -130,3 +119,13 @@
|
|||
- name: Show output
|
||||
debug:
|
||||
var: output
|
||||
|
||||
- name: Create deployment config again
|
||||
openshift_raw:
|
||||
state: present
|
||||
inline: *dc
|
||||
register: output
|
||||
|
||||
- name: DC creation should be idempotent
|
||||
assert:
|
||||
that: not output.changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue