Skip to content

test: Pass object to addParam in ProgramCallFunctional.js #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2020
Merged

test: Pass object to addParam in ProgramCallFunctional.js #195

merged 1 commit into from
Mar 26, 2020

Conversation

abmusse
Copy link
Member

@abmusse abmusse commented Mar 26, 2020

Resolves #194

@abmusse abmusse requested a review from kadler March 26, 2020 20:21
@abmusse
Copy link
Member Author

abmusse commented Mar 26, 2020

$ ./node_modules/mocha/bin/mocha --timeout 3s test/functional/ProgramCallFunctional.js 


  ProgramCall Functional Tests
    Test ProgramCall()
      ✓ calls QWCRSVAL program checks if it ran successfully using idb transport (171ms)
      ✓ calls QWCRSVAL program checks if it ran successfully using rest transport (102ms)
      ✓ calls QWCRSVAL program checks if it ran successfully using ssh transport (722ms)
      ✓ calls QWCRSVAL program checks if it ran successfully using odbc transport (122ms)
    Test ProgramCall()
      ✓ calls QWCRSVAL program and returns arbitrarily named parameter using idb transport (68ms)
      ✓ calls QWCRSVAL program and returns arbitrarily named parameter using rest transport (73ms)
      ✓ calls QWCRSVAL program and returns arbitrarily named parameter using ssh transport (620ms)
      ✓ calls QWCRSVAL program and returns arbitrarily named parameter using odbc transport (93ms)
    Test ProgramCall()
      - Should be successful with addReturn arbitrary attribute specified using using idb transport
      - Should be successful with addReturn arbitrary attribute specified using using rest transport
      - Should be successful with addReturn arbitrary attribute specified using using ssh transport
      - Should be successful with addReturn arbitrary attribute specified using using odbc transport


  8 passing (2s)
  4 pending

const paramValue = 'errno';

program.addParam(errno, { io: 'both', len: 'rec2', name: paramValue });
const outBuf = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second test in ProgramCallFunctional.js Does not seem useful.
Its the exact same test as the first the only difference it adds name field for errno DS.

We should remove it and add other useful ProgramCall functional tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I think the reason the name was originally in a variable was to test that it comes back, but it never did. Probably makes sense to just remove.

Copy link
Member

@kadler kadler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, send a follow-on to remove the one test case or improve it.

@kadler kadler merged commit 411373a into IBM:master Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to update ProgramCall functional tests to pass an object to addParam
2 participants