diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-02-09 21:51:12 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2017-03-06 09:09:14 -0500 |
commit | e8f02e60daf2d158a0fa6f08ac7d3ed89f9c5317 (patch) | |
tree | 6d35f4502d91f79e884d2edfa6f15e1853e052f2 /roles/lib_openshift/src/test | |
parent | c25792965600baf821d0244682423ff841baffe1 (diff) | |
download | openshift-e8f02e60daf2d158a0fa6f08ac7d3ed89f9c5317.tar.gz openshift-e8f02e60daf2d158a0fa6f08ac7d3ed89f9c5317.tar.bz2 openshift-e8f02e60daf2d158a0fa6f08ac7d3ed89f9c5317.tar.xz openshift-e8f02e60daf2d158a0fa6f08ac7d3ed89f9c5317.zip |
Adding integration test. Fixed issue with node_selector.
Diffstat (limited to 'roles/lib_openshift/src/test')
-rwxr-xr-x | roles/lib_openshift/src/test/integration/oc_project.yml | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/roles/lib_openshift/src/test/integration/oc_project.yml b/roles/lib_openshift/src/test/integration/oc_project.yml new file mode 100755 index 000000000..9f700c62c --- /dev/null +++ b/roles/lib_openshift/src/test/integration/oc_project.yml @@ -0,0 +1,83 @@ +#!/usr/bin/ansible-playbook --module-path=../../../library/ +# ./oc_project.yml -M ../../../library -e "cli_master_test=$OPENSHIFT_MASTER +--- +- hosts: "{{ cli_master_test }}" + gather_facts: no + user: root + tasks: + - name: create a project + oc_project: + display_name: operations project + name: operations + state: present + description: All things operations + node_selector: + - ops_only=true + register: projout + - debug: var=projout + + - assert: + that: + - "projout.results.results['metadata']['name'] == 'operations'" + - projout.changed + msg: project create failed. + + - name: create a project + oc_project: + display_name: operations project + name: operations + state: present + description: All things operations + node_selector: + - ops_only=true + register: projout + - debug: var=projout + + - assert: + that: + - "projout.results.results['metadata']['name'] == 'operations'" + - projout.changed == False + msg: project create failed. + + - name: update a project + oc_project: + display_name: operations project one + name: operations + state: present + description: All things operations + node_selector: + - ops_only=true + register: projout + - debug: var=projout + + - assert: + that: + - "projout.results.results['metadata']['annotations']['openshift.io/display-name'] == 'operations project one'" + - projout.changed == True + msg: project create failed. + + - name: update a project + oc_project: + name: operations + state: list + register: projout + - debug: var=projout + + - assert: + that: + - "projout.results['metadata']['annotations']['openshift.io/display-name'] == 'operations project one'" + - projout.changed == False + - projout.state == 'list' + msg: project list failed. + + - name: delete a project + oc_project: + name: operations + state: absent + register: projout + - debug: var=projout + + - assert: + that: + - projout.changed == True + msg: project delete failed. |