Skip to content

Commit 698e400

Browse files
Merge pull request #53 from sophiegreen/master
Add IT for invalid pipeline def config file
2 parents bdeb552 + eb5fd60 commit 698e400

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 create pipeline failure
12+
ibm.ibm_zos_cics.cmci_create:
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: 'CICSDefinitionPipeline'
21+
create_parameters:
22+
- name: 'CSD'
23+
attributes:
24+
name: 'ANSIBUND'
25+
csdgroup: 'ANDITEST'
26+
configfile: "invalid"
27+
failed_when: false
28+
register: result
29+
30+
- name: debug
31+
debug:
32+
msg: '{{ result }}'
33+
34+
- name: assert
35+
assert:
36+
that:
37+
- result.failed is false
38+
# This will need updating when we pull out more specific error messages from the CMCI response.
39+
# Expecting the error to contain 'Attribute Configuration File (CONFIGFILE) Error(PIPEDEF_INV_DATA)'
40+
- result.msg == "CMCI request failed with response \"TABLEERROR\" reason \"DATAERROR\""

tests/integration/targets/cics_cmci/runme.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ ansible-playbook -e "@cmci-variables.yml" playbooks/cmci_invalid_credentials.yml
1010
ansible-playbook -e "@cmci-variables.yml" playbooks/cmci_incorrect_scope.yml
1111
ansible-playbook -e "@cmci-variables.yml" playbooks/cmci_incorrect_context.yml
1212
ansible-playbook -e "@cmci-variables.yml" playbooks/cics_cmci_http.yml
13-
ansible-playbook -e "@cmci-variables.yml" playbooks/cmci_create_bundle_failure.yml
13+
ansible-playbook -e "@cmci-variables.yml" playbooks/cmci_create_bundle_failure.yml
14+
ansible-playbook -e "@cmci-variables.yml" playbooks/cmci_create_pipeline_failure.yml

0 commit comments

Comments
 (0)