-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add backwards-compatibility with sshAuthAgent option
Since d2f92b2, callers may be passing this option in and expect it to be used as the `agent` option for ssh2.
- Loading branch information
Showing
2 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,4 +169,14 @@ describe('Modem', function() { | |
assert.strictEqual(modem.sshOptions.agent, '/var/lib/sock'); | ||
assert.strictEqual(modem.sshOptions.foo, 'bar'); | ||
}); | ||
|
||
it('supports custom sshAuthAgent for backwards-compatibility', function() { | ||
process.env.DOCKER_HOST = 'ssh://[email protected]:5555'; | ||
process.env.SSH_AUTH_SOCK = '/var/lib/sock'; | ||
|
||
var modem = new Modem({ | ||
sshAuthAgent: '/var/lib/custom_agent', | ||
}); | ||
assert.strictEqual(modem.sshOptions.agent, '/var/lib/custom_agent'); | ||
}); | ||
}); |