mikeal / sequest

Simplified API for SSH and SFTP similar to request.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests fail when upgrading to ssh2@0.3.x

jcrugzz opened this issue · comments

@mscdex maybe you have an idea here but it seems like part of the stream is getting cut off (might be a timing issue or something of the sort).

@mikeal did you try and use 0.3.x originally and choose 0.2.x back when you incepted this module? I'd like to figure this out as the proxy ssh example i tried with 0.2.x didn't seem to work.

Failed test output...

zsh:1: command not found: totallyMadeUpThing
not ok 10 should be equal
  ---
    operator: equal
    expected:
      '__testfile2\ntest-basic.js\ntest-get-put-connect.js\ntest-get-put.js\ntest-stream-connect.js\ntest-stream.js\n'
    actual:
      '__testfile2\ntest-basic.js\ntest-get-put-connect.js\ntest-get-put.js\ntest-stream-connect.js\n'
    at: Sequest.<anonymous> (/Users/jcrugzz/github/mikeal/sequest/test/test-stream-connect.js:64:9)
  ...
ok 11 should be equal
# cleanup
# streamed ls
ok 12 should be equal
ok 13 should be equal
# error in middle
zsh:1: command not found: totallyMadeUpThing
not ok 14 should be equal
  ---
    operator: equal
    expected:
      '__testfile\ntest-basic.js\ntest-get-put-connect.js\ntest-get-put.js\ntest-stream-connect.js\ntest-stream.js\n'
    actual:
      '__testfile\ntest-basic.js\ntest-get-put-connect.js\ntest-get-put.js\ntest-stream-connect.js\n'
    at: Sequest.<anonymous> (/Users/jcrugzz/github/mikeal/sequest/test/test-stream.js:63:9)
  ...
# cleanup

I'll be digging into this deeper tonight and tomorrow

hmm this actually just might be the slicing of the error that is no longer in stdout. you can most likely ignore this.

that's entirely possible. this might have to do with the dual stdout/stderr output stream vs the seperated streams in the newer implementation. I think I have code to deal with both but I bet the behavior is slightly different.

@mikeal it was just how you were slicing the error out in the tests since its now in a separate stream