Skip to content

Commit

Permalink
Refactor monkey patching code to use gomonkey library and optimize sl…
Browse files Browse the repository at this point in the history
…eep in UnpatchAll function
  • Loading branch information
samanhappy committed Sep 2, 2024
1 parent d6f7909 commit 1c10597
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion probe/ssh/ssh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ YWwBAg==
checkServer(false, "SSHConfig failed")

// SSHConfig failed
monkey.UnpatchInstanceMethod(reflect.TypeOf(ed), "SSHConfig")
monkey.PatchInstanceMethod(reflect.TypeOf(ed), "SSHConfig", func(e *Endpoint, kind, name string, timeout time.Duration) (*ssh.ClientConfig, error) {
return nil, errors.New("SSHConfig failed")
})
Expand Down

0 comments on commit 1c10597

Please sign in to comment.