File tree Expand file tree Collapse file tree 3 files changed +49
-1
lines changed
tests/integration/targets/cics_cmci_missing_libraries Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,15 @@ echo "/* -----------------------------------------------------------------------
33
33
echo " /* -------------------------------------------------------------------------- */"
34
34
echo " /* Integration tests Python 3.8 */"
35
35
echo " /* -------------------------------------------------------------------------- */"
36
- (set -x; ansible-test integration --python 3.8)
36
+ (set -x; ansible-test integration cics_cmci --python 3.8)
37
+
38
+ echo " /* -------------------------------------------------------------------------- */"
39
+ echo " /* Integration tests for missing libraries Python 3.8 */"
40
+ echo " /* -------------------------------------------------------------------------- */"
41
+ (set -x; pip uninstall xmltodict -y)
42
+ (set -x; ansible-test integration cics_cmci_missing_libraries --python 3.8)
43
+ (set -x; pip install -r prod-requirements.txt)
44
+
37
45
echo $?
38
46
deactivate
39
47
Original file line number Diff line number Diff line change
1
+ # Copyright (c) IBM Corporation 2020
2
+ # Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0)
3
+ ---
4
+ - name : CMCI Integration Test
5
+ collections :
6
+ - ibm.ibm_zos_cics
7
+ hosts : ' localhost'
8
+ gather_facts : ' false'
9
+
10
+ tasks :
11
+ - name : test missing xmltodict library
12
+ ibm.ibm_zos_cics.cmci_get :
13
+ cmci_host : ' {{ cmci_host }}'
14
+ cmci_port : ' {{ cmci_port }}'
15
+ cmci_user : ' {{ cmci_user }}'
16
+ cmci_password : ' {{ cmci_password }}'
17
+ insecure : true
18
+ context : ' {{ context }}'
19
+ scope : ' {{ scope }}'
20
+ type : ' cicsprogram'
21
+ failed_when : false
22
+ register : result
23
+
24
+ - name : debug
25
+ debug :
26
+ msg : ' {{ result.msg }}'
27
+
28
+ - name : assert
29
+ assert :
30
+ that :
31
+ - result.failed is false
32
+ - ' {{ result.msg[:58] == "Failed to import the required Python library (encoder) on " }}'
33
+ - ' {{ result.msg[-232:] == "Please read the module documentation and install it in the appropriate location.
34
+ If the required library is installed, but Ansible is using the wrong Python interpreter, please
35
+ consult the documentation on ansible_python_interpreter" }}'
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Copyright (c) IBM Corporation 2020
3
+ # Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0)
4
+ set -eux # This is important to ensure that return codes from failing tests are propagated
5
+ ansible-playbook -e " @cmci-variables.yml" playbooks/cmci_missing_xmltodict.yml
You can’t perform that action at this time.
0 commit comments