From 1c1059777438e75b45708462626baf00fbd627af Mon Sep 17 00:00:00 2001 From: samanhappy Date: Mon, 2 Sep 2024 11:15:54 +0800 Subject: [PATCH] Refactor monkey patching code to use gomonkey library and optimize sleep in UnpatchAll function --- probe/ssh/ssh_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/probe/ssh/ssh_test.go b/probe/ssh/ssh_test.go index aefcf447..7d107ea6 100644 --- a/probe/ssh/ssh_test.go +++ b/probe/ssh/ssh_test.go @@ -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") })