-
Notifications
You must be signed in to change notification settings - Fork 534
Conversation
@ekyoung Thank you for the PR. |
"os" | ||
"os/user" | ||
"path/filepath" | ||
|
||
"github.com/xanzy/ssh-agent" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you put this import in the public packages group?
@mcuadros I moved the import statement. |
@@ -94,18 +94,9 @@ func (s *SuiteCommon) TestPublicKeysCallbackString(c *C) { | |||
c.Assert(a.String(), Equals, fmt.Sprintf("user: test, name: %s", PublicKeysCallbackName)) | |||
} | |||
func (s *SuiteCommon) TestNewSSHAgentAuth(c *C) { | |||
addr := os.Getenv("SSH_AUTH_SOCK") | |||
err := os.Unsetenv("SSH_AUTH_SOCK") | |||
auth, err := NewSSHAgentAuth("foo") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test should be skipped if SSH_AUTH_SOCK is not defined:
os.Getenv("SSH_AUTH_SOCK") == "" {
c.Skip("SSH_AUTH_SOCK or SSH_TEST_PRIVATE_KEY are required")
return
}
Also, the old test tested that the right error was returned when agent is not running, please, preserve that test case.
@ekyoung can you squash your commit to merge this? |
1107000
to
f9dc7b1
Compare
Codecov Report
@@ Coverage Diff @@
## master #405 +/- ##
==========================================
- Coverage 77.69% 77.08% -0.61%
==========================================
Files 124 124
Lines 9001 8998 -3
==========================================
- Hits 6993 6936 -57
- Misses 1234 1302 +68
+ Partials 774 760 -14
Continue to review full report at Codecov.
|
@mcuadros Done. |
Looks like you guys wrapped this up. Sorry I couldn't get back on it earlier. Thanks for merging. |
Fixes #404. I used xanzy/ssh-agent to create the ssh agent correctly based on os based on this PR in terraform that fixed a similar issue in that product.
hashicorp/terraform#4323