TritonDataCenter / node-manta

Node.js SDK for Manta
75 stars 54 forks source link

completion tests could ignore hidden files #327

Closed jordanhendricks closed 6 years ago

jordanhendricks commented 7 years ago

When I run the test suite with an m* file open in vim, I hit some completion test failures that are testing against the vim swp files:

completion.test.js
 .mmpu.swp --completion

Error: Command failed: /bin/sh: line 1: /root/node-manta/bin/.mmpu.swp: cannot execute [Permission denied]

    at ChildProcess.exithandler (child_process.js:658:15)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:766:16)
    at Process.ChildProcess._handle.onexit (child_process.js:833:5)

Assertion Message: no stderr output from ".mmpu.swp --completion"
AssertionError: '/bin/sh: line 1: /root/node-manta/bin/.mmpu.swp: cannot execute [Permission denied]\n' == ''
    at Object.equal (/root/node-manta/node_modules/nodeunit/lib/types.js:83:39)
    at /root/node-manta/test/completion.test.js:40:15
    at ChildProcess.exithandler (child_process.js:662:7)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:766:16)
    at Process.ChildProcess._handle.onexit (child_process.js:833:5)

The completion test runs on all files in bin/. It would be nice if it excluded hidden files to prevent spurious test failures during development.

bahamas10 commented 6 years ago

https://cr.joyent.us/#/c/4716/

$ touch ./bin/.hidden
$ ./node_modules/.bin/nodeunit test/completion.test.js 

completion.test.js
✔ mchattr --completion
✔ mchmod --completion
✔ mfind --completion
✔ mget --completion
✔ minfo --completion
✔ mjob --completion
✔ mln --completion
✔ mlogin --completion
✔ mls --completion
✔ mmd5 --completion
✔ mmkdir --completion
✔ mmpu --completion
✔ mput --completion
✔ mrm --completion
✔ mrmdir --completion
✔ msign --completion
✔ muntar --completion

OK: 51 assertions (5683ms)