|
| 1 | +# (c) Copyright IBM Corp. 2023 |
| 2 | +# Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0) |
| 3 | +--- |
| 4 | +- name: CICS Version Integration Test |
| 5 | + hosts: "all" |
| 6 | + gather_facts: false |
| 7 | + |
| 8 | + tasks: |
| 9 | + ############################################################################ |
| 10 | + # Get CICS version for development version |
| 11 | + ############################################################################ |
| 12 | + - name: Retrieve CICS version information |
| 13 | + environment: "{{ environment_vars }}" |
| 14 | + cics_version: |
| 15 | + CICS_HLQ: 'ANTZ.CICS.TS.DEV.INTEGRAT' |
| 16 | + register: result |
| 17 | + |
| 18 | + - name: Assert 1 |
| 19 | + ansible.builtin.assert: |
| 20 | + that: |
| 21 | + - result is not changed |
| 22 | + - result.cics_version == '7.5.0' |
| 23 | + - result.rc == 0 |
| 24 | + - "'exception' not in result" |
| 25 | + |
| 26 | + ############################################################################ |
| 27 | + # Get CICS version for 6.1 |
| 28 | + ############################################################################ |
| 29 | + - name: Retrieve CICS version information |
| 30 | + environment: "{{ environment_vars }}" |
| 31 | + cics_version: |
| 32 | + CICS_HLQ: 'CTS610.CICS740' |
| 33 | + register: result |
| 34 | + |
| 35 | + - name: Assert 2 |
| 36 | + ansible.builtin.assert: |
| 37 | + that: |
| 38 | + - result is not changed |
| 39 | + - result.cics_version == '7.4.0' |
| 40 | + - result.rc == 0 |
| 41 | + - "'exception' not in result" |
| 42 | + |
| 43 | + ############################################################################ |
| 44 | + # Get CICS version for 5.6 |
| 45 | + ############################################################################ |
| 46 | + - name: Retrieve CICS version information |
| 47 | + environment: "{{ environment_vars }}" |
| 48 | + cics_version: |
| 49 | + CICS_HLQ: 'CTS560.CICS730' |
| 50 | + register: result |
| 51 | + |
| 52 | + - name: Assert 3 |
| 53 | + ansible.builtin.assert: |
| 54 | + that: |
| 55 | + - result is not changed |
| 56 | + - result.cics_version == '7.3.0' |
| 57 | + - result.rc == 0 |
| 58 | + - "'exception' not in result" |
| 59 | + |
| 60 | + ############################################################################ |
| 61 | + # Get CICS version for 5.4 |
| 62 | + ############################################################################ |
| 63 | + - name: Retrieve CICS version information |
| 64 | + environment: "{{ environment_vars }}" |
| 65 | + cics_version: |
| 66 | + CICS_HLQ: 'CTS540.CICS710' |
| 67 | + register: result |
| 68 | + |
| 69 | + - name: Assert 4 |
| 70 | + ansible.builtin.assert: |
| 71 | + that: |
| 72 | + - result is not changed |
| 73 | + - result.cics_version == '7.1.0' |
| 74 | + - result.rc == 0 |
| 75 | + - "'exception' not in result" |
| 76 | + |
| 77 | + ############################################################################ |
| 78 | + # Fail to get CICS version from incorrect HLQ |
| 79 | + ############################################################################ |
| 80 | + - name: Fail to get CICS version information from incorrect HLQ |
| 81 | + environment: "{{ environment_vars }}" |
| 82 | + cics_version: |
| 83 | + CICS_HLQ: 'ANZ.CIS.TS.EV.IEGRAT' |
| 84 | + register: result |
| 85 | + failed_when: false |
| 86 | + |
| 87 | + - name: Assert 5 |
| 88 | + ansible.builtin.assert: |
| 89 | + that: |
| 90 | + - result is not changed |
| 91 | + - result.rc != 0 |
| 92 | + - "'exception' in result" |
0 commit comments