From df06fbbd00d9eceb187de16d52d7fb870fc1abbd Mon Sep 17 00:00:00 2001 From: Benjamin Wenger <ben@elixxir.ioo> Date: Tue, 30 Aug 2022 08:04:44 -0700 Subject: [PATCH] move testmain to manager_test.go --- channels/manager_test.go | 15 +++++++++++++++ channels/userListener_test.go | 9 --------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 channels/manager_test.go diff --git a/channels/manager_test.go b/channels/manager_test.go new file mode 100644 index 000000000..39911b2fc --- /dev/null +++ b/channels/manager_test.go @@ -0,0 +1,15 @@ +package channels + +import ( + "os" + "testing" + + jww "github.com/spf13/jwalterweatherman" +) + +func TestMain(m *testing.M) { + // many tests trigger warn prints, set the out threshold so the warns + // can be seen in the logs + jww.SetStdoutThreshold(jww.LevelWarn) + os.Exit(m.Run()) +} diff --git a/channels/userListener_test.go b/channels/userListener_test.go index 7a2ec28ac..5a5a0035d 100644 --- a/channels/userListener_test.go +++ b/channels/userListener_test.go @@ -3,9 +3,7 @@ package channels import ( "bytes" "crypto/ed25519" - jww "github.com/spf13/jwalterweatherman" "math/rand" - "os" "testing" "time" @@ -19,13 +17,6 @@ import ( "gitlab.com/xx_network/primitives/id" ) -func TestMain(m *testing.M) { - // many tests trigger warn prints, set the out threshold so the warns - // can be seen in the logs - jww.SetStdoutThreshold(jww.LevelWarn) - os.Exit(m.Run()) -} - type triggerEventDummy struct { gotData bool -- GitLab