From 3de24e3e4818aa6e1f836498fed81d913bbe827b Mon Sep 17 00:00:00 2001 From: Jeff Cantrill Date: Thu, 27 Jul 2017 10:12:57 -0400 Subject: add selector and storage class name to oc_pvc module --- .../lib_openshift/src/test/integration/oc_pvc.yml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 roles/lib_openshift/src/test/integration/oc_pvc.yml (limited to 'roles/lib_openshift/src/test/integration') diff --git a/roles/lib_openshift/src/test/integration/oc_pvc.yml b/roles/lib_openshift/src/test/integration/oc_pvc.yml new file mode 100755 index 000000000..fb3a4781f --- /dev/null +++ b/roles/lib_openshift/src/test/integration/oc_pvc.yml @@ -0,0 +1,28 @@ +#!/usr/bin/ansible-playbook --module-path=../../../library/ +# ./oc_pvc.yml -e "cli_master_test=$OPENSHIFT_MASTER +--- +- hosts: "{{ cli_master_test }}" + gather_facts: no + user: root + tasks: + - name: create pvc + oc_pvc: + state: present + name: oc-pvc-create-test + namespace: default + volume_capacity: 3G + access_modes: + - ReadWriteOnce + selector: + foo: bar + storage_class_name: my-storage-class-name + register: pvcout + - debug: var=pvcout + + - assert: + that: + - pvcout.results.results[0]['metadata']['name'] == 'oc-pvc-create-test' + - pvcout.results.results[0]['spec']['storageClassName'] == 'my-storage-class-name' + - pvcout.results.results[0]['spec']['selector']['matchLabels']['foo'] == 'bar' + - pvcout.changed + msg: pvc create failed. -- cgit v1.2.3