File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
package cli
2
2
3
3
import (
4
- "os"
5
4
"testing"
6
5
7
6
"github.com/stretchr/testify/require"
7
+ "go.uber.org/goleak"
8
8
)
9
9
10
10
func Test_formatExamples (t * testing.T ) {
@@ -67,7 +67,11 @@ func Test_formatExamples(t *testing.T) {
67
67
}
68
68
69
69
func TestMain (m * testing.M ) {
70
- // Replace with goleak.VerifyTestMain(m) when we enable goleak.
71
- os .Exit (m .Run ())
72
- // goleak.VerifyTestMain(m)
70
+ goleak .VerifyTestMain (m ,
71
+ // The lumberjack library is used by by agent and seems to leave
72
+ // goroutines after Close(), fails TestGitSSH tests.
73
+ // https://github.com/natefinch/lumberjack/pull/100
74
+ goleak .IgnoreTopFunction ("gopkg.in/natefinch/lumberjack%2ev2.(*Logger).millRun" ),
75
+ goleak .IgnoreTopFunction ("gopkg.in/natefinch/lumberjack%2ev2.(*Logger).mill.func1" ),
76
+ )
73
77
}
You can’t perform that action at this time.
0 commit comments