Skip to content

Commit 2948982

Browse files
ledinaGitHub Enterprise
authored andcommitted
Merge pull request ansible-collections#147 from CICS/integration-fixes
Refactored integration tests so they can be run all together
2 parents 4bcb02a + 950bcbd commit 2948982

File tree

5 files changed

+12
-1
lines changed

5 files changed

+12
-1
lines changed

tests/integration/targets/cics_cmci_missing_requests_library/runme.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
# (c) Copyright IBM Corp. 2021
33
# Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0)
44
set -eux # This is important to ensure that return codes from failing tests are propagated
5+
if pip show requests 2>&1 | grep -q 'Package(s) not found'; then
56
ansible-playbook playbooks/cmci_missing_requests.yml
7+
fi

tests/integration/targets/cics_cmci_missing_xmltodict_library/runme.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
# (c) Copyright IBM Corp. 2021
33
# Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0)
44
set -eux # This is important to ensure that return codes from failing tests are propagated
5+
if pip show xmltodict 2>&1 | grep -q 'Package(s) not found'; then
56
ansible-playbook playbooks/cmci_missing_xmltodict.yml
7+
fi
File renamed without changes.

tests/integration/targets/cics_intra_missing_zos_core/runme.sh renamed to tests/integration/targets/cics_missing_zos_core/runme.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ VAR_PATH="$ANSIBLE_COLLECTIONS_PATH/ansible_collections/ibm/ibm_zos_cics/tests/i
88
INV_PATH="$ANSIBLE_COLLECTIONS_PATH/ansible_collections/ibm/ibm_zos_cics/tests/integration/inventory_zos.yml"
99
ZOS_ENV="$ANSIBLE_COLLECTIONS_PATH/ansible_collections/ibm/ibm_zos_cics/tests/integration/variables/zos.yml"
1010

11-
ansible-playbook -i "$INV_PATH" -e "@$VAR_PATH" -e "@$ZOS_ENV" playbooks/missing_core.yml
11+
12+
if [ -z "$(ansible-galaxy collection list ibm.ibm_zos_core)" ]; then
13+
ansible-playbook -i "$INV_PATH" -e "@$VAR_PATH" -e "@$ZOS_ENV" playbooks/missing_core.yml
14+
fi

tests/integration/targets/cics_warm_data_set/runme.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ VAR_PATH="$ANSIBLE_COLLECTIONS_PATH/ansible_collections/ibm/ibm_zos_cics/tests/i
88
INV_PATH="$ANSIBLE_COLLECTIONS_PATH/ansible_collections/ibm/ibm_zos_cics/tests/integration/inventory_zos.yml"
99
ZOS_ENV="$ANSIBLE_COLLECTIONS_PATH/ansible_collections/ibm/ibm_zos_cics/tests/integration/variables/zos.yml"
1010

11+
python_ver=$(python -V 2>&1 | grep -Po '(?<=Python )(.+)')
12+
13+
if [[ "${python_ver:0:3}" != "2.7" ]]; then
1114
ansible-playbook -i "$INV_PATH" -e "@$VAR_PATH" -e "@$ZOS_ENV" playbooks/aux_trace_warm_state.yml
15+
fi

0 commit comments

Comments
 (0)