From 9506586e8ceeef1cb987814ea6550846ce985341 Mon Sep 17 00:00:00 2001 From: Abdirahim Musse <33973272+abmusse@users.noreply.github.com> Date: Thu, 14 May 2020 11:44:44 -0500 Subject: [PATCH] test: Remove redundant ProgramCall test --- test/functional/ProgramCallFunctional.js | 57 -------------------- test/functional/deprecated/iPgmFunctional.js | 35 ------------ 2 files changed, 92 deletions(-) diff --git a/test/functional/ProgramCallFunctional.js b/test/functional/ProgramCallFunctional.js index 20e6857e..b5c95bf0 100644 --- a/test/functional/ProgramCallFunctional.js +++ b/test/functional/ProgramCallFunctional.js @@ -83,63 +83,6 @@ describe('ProgramCall Functional Tests', () => { }); }); - - describe('Test ProgramCall()', () => { - it('calls QWCRSVAL program and returns arbitrarily named parameter', (done) => { - const connection = new Connection(config); - - const program = new ProgramCall('QWCRSVAL', { lib: 'QSYS' }); - - const outBuf = { - type: 'ds', - io: 'out', - fields: [ - { type: '10i0', value: 0 }, - { type: '10i0', value: 0 }, - { type: '36h', value: '' }, - { type: '10A', value: '' }, - { type: '1A', value: '' }, - { type: '1A', value: '' }, - { type: '10i0', value: 0 }, - { type: '10i0', value: 0 }, - ], - }; - - const errno = { - name: 'errno', - type: 'ds', - io: 'both', - len: 'rec2', - fields: [ - { - name: 'bytes_provided', - type: '10i0', - value: 0, - setlen: 'rec2', - }, - { name: 'bytes_available', type: '10i0', value: 0 }, - { name: 'msgid', type: '7A', value: '' }, - { type: '1A', value: '' }, - ], - }; - - program.addParam(outBuf); - program.addParam({ type: '10i0', value: 66 }); - program.addParam({ type: '10i0', value: 1 }); - program.addParam({ type: '10A', value: 'QCCSID' }); - program.addParam(errno); - connection.add(program); - connection.run((error, xmlOut) => { - expect(error).to.equal(null); - parseString(xmlOut, (parseError, result) => { - expect(parseError).to.equal(null); - expect(result.myscript.pgm[0].success[0]).to.include('+++ success QSYS QWCRSVAL'); - done(); - }); - }); - }); - }); - describe.skip('Test ProgramCall()', () => { // ZZSRV6 program requires XMLSERVICE built with tests // Skip for now, we need to add before hook to check ZZSRV6 is available diff --git a/test/functional/deprecated/iPgmFunctional.js b/test/functional/deprecated/iPgmFunctional.js index fd478d94..ed1effef 100644 --- a/test/functional/deprecated/iPgmFunctional.js +++ b/test/functional/deprecated/iPgmFunctional.js @@ -80,41 +80,6 @@ describe('iPgm Functional Tests', () => { }); }); - - describe('Test iPgm()', () => { - it('calls QWCRSVAL program and returns arbitrarily named parameter', (done) => { - const connection = new iConn(database, username, password, restOptions); - - const program = new iPgm('QWCRSVAL', { lib: 'QSYS' }); - - const outBuf = [ - [0, '10i0'], - [0, '10i0'], - ['', '36h'], - ['', '10A'], - ['', '1A'], - ['', '1A'], - [0, '10i0'], - [0, '10i0'], - ]; - program.addParam(outBuf, { io: 'out' }); - program.addParam(66, '10i0'); - program.addParam(1, '10i0'); - program.addParam('QCCSID', '10A'); - const paramValue = 'errno'; - - program.addParam(this.errno, { io: 'both', len: 'rec2', name: paramValue }); - connection.add(program); - connection.run((xmlOut) => { - parseString(xmlOut, (parseError, result) => { - expect(parseError).to.equal(null); - expect(result.myscript.pgm[0].success[0]).to.include('+++ success QSYS QWCRSVAL'); - done(); - }); - }); - }); - }); - describe.skip('Test iPgm()', () => { // ZZSRV6 program requires XMLSERVICE built with tests // Skip for now, we need to add before hook to check if ZZSRV6 is available