Skip to content

Commit

Permalink
dont open ssh tempfile exclusively (#137)
Browse files Browse the repository at this point in the history
* dont open ssh tempfile exclusively

* disable bad unit test

* add explanatory comment
  • Loading branch information
hopkiw authored Oct 13, 2021
1 parent d3fcfe3 commit 2d567f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion google_guest_agent/accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ func TestAccountsDisabled(t *testing.T) {
}
}

func TestNewPwd(t *testing.T) {
// rename this with leading disabled because this is a resource
// intensive test. this test takes approx. 141 seconds to complete, next
// longest test is 0.43 seconds.
func disabledTestNewPwd(t *testing.T) {
minPasswordLength := 15
maxPasswordLength := 255
var tests = []struct {
Expand Down
2 changes: 1 addition & 1 deletion google_guest_agent/non_windows_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ func updateAuthorizedKeysFile(user string, keys []string) error {
userKeys = append(userKeys, key)
}

newfile, err := os.OpenFile(tempPath, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0600)
newfile, err := os.OpenFile(tempPath, os.O_WRONLY|os.O_CREATE, 0600)
if err != nil {
return err
}
Expand Down

0 comments on commit 2d567f8

Please sign in to comment.