diff options
Diffstat (limited to 'roles/lib_openshift/src/test/integration')
-rwxr-xr-x[-rw-r--r--] | roles/lib_openshift/src/test/integration/oc_route.yml (renamed from roles/lib_openshift/src/test/integration/route.yml) | 29 | ||||
-rwxr-xr-x | roles/lib_openshift/src/test/integration/oc_version.yml | 17 |
2 files changed, 41 insertions, 5 deletions
diff --git a/roles/lib_openshift/src/test/integration/route.yml b/roles/lib_openshift/src/test/integration/oc_route.yml index 6a96b334f..620d5d5e7 100644..100755 --- a/roles/lib_openshift/src/test/integration/route.yml +++ b/roles/lib_openshift/src/test/integration/oc_route.yml @@ -1,5 +1,5 @@ -#!/usr/bin/ansible-playbook -# ./route.yml -M ../../../library -e "cli_master_test=$OPENSHIFT_MASTER +#!/usr/bin/ansible-playbook --module-path=../../../library/ +# ./oc_route.yml -M ../../../library -e "cli_master_test=$OPENSHIFT_MASTER --- - hosts: "{{ cli_master_test }}" gather_facts: no @@ -8,15 +8,20 @@ - name: create route oc_route: name: test - namespace: test + namespace: default tls_termination: edge cert_content: testing cert cacert_content: testing cacert + key_content: key content service_name: test host: test.example register: routeout - debug: var=routeout + - assert: + that: "routeout.results.results[0]['metadata']['name'] == 'test'" + msg: route create failed + - name: get route oc_route: state: list @@ -25,6 +30,10 @@ register: routeout - debug: var=routeout + - assert: + that: "routeout.results[0]['metadata']['name'] == 'test'" + msg: get route failed + - name: delete route oc_route: state: absent @@ -33,13 +42,18 @@ register: routeout - debug: var=routeout + - assert: + that: "routeout.results.returncode == 0" + msg: delete route failed + - name: create route oc_route: name: test - namespace: test + namespace: default tls_termination: edge cert_content: testing cert cacert_content: testing cacert + key_content: testing key service_name: test host: test.example register: routeout @@ -48,11 +62,16 @@ - name: create route noop oc_route: name: test - namespace: test + namespace: default tls_termination: edge cert_content: testing cert cacert_content: testing cacert + key_content: testing key service_name: test host: test.example register: routeout - debug: var=routeout + + - assert: + that: "routeout.changed == False" + msg: Route create not idempotent diff --git a/roles/lib_openshift/src/test/integration/oc_version.yml b/roles/lib_openshift/src/test/integration/oc_version.yml new file mode 100755 index 000000000..52336d8da --- /dev/null +++ b/roles/lib_openshift/src/test/integration/oc_version.yml @@ -0,0 +1,17 @@ +#!/usr/bin/ansible-playbook --module-path=../../../library/ +# ./oc_version.yml -e "cli_master_test=$OPENSHIFT_MASTER +--- +- hosts: "{{ cli_master_test }}" + gather_facts: no + user: root + tasks: + - name: Get openshift version + oc_version: + register: versionout + + - debug: var=versionout + + - assert: + that: + - "'oc_numeric' in versionout.results.keys()" + msg: "Did not find 'oc_numeric' in version results." |