summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/test/integration
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-01-19 12:24:52 -0500
committerKenny Woodson <kwoodson@redhat.com>2017-01-20 11:52:10 -0500
commit6218b9938b523c545a7610a3c77d6a19aea81e1a (patch)
treeb98fa3931aff326c10fec573c442e283d3d6f9bf /roles/lib_openshift/src/test/integration
parent836bd8115c7d9386b9f5d3d6cca41785853c16c7 (diff)
downloadopenshift-6218b9938b523c545a7610a3c77d6a19aea81e1a.tar.gz
openshift-6218b9938b523c545a7610a3c77d6a19aea81e1a.tar.bz2
openshift-6218b9938b523c545a7610a3c77d6a19aea81e1a.tar.xz
openshift-6218b9938b523c545a7610a3c77d6a19aea81e1a.zip
Adding version to lib_openshift
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-xroles/lib_openshift/src/test/integration/oc_version.yml17
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."