Update TestMain(): do not call os.Exit() explicitly (#8046)

* update workspace

* update testmain
This commit is contained in:
Victor Farazdagi
2020-12-04 19:10:07 +03:00
committed by GitHub
parent ccba8cfa5a
commit be078d6a16
20 changed files with 124 additions and 203 deletions

View File

@@ -5,7 +5,6 @@ import (
"crypto/rand"
"fmt"
"io/ioutil"
"os"
"testing"
"time"
@@ -20,13 +19,10 @@ import (
)
func TestMain(m *testing.M) {
run := func() int {
logrus.SetLevel(logrus.DebugLevel)
logrus.SetOutput(ioutil.Discard)
logrus.SetLevel(logrus.DebugLevel)
logrus.SetOutput(ioutil.Discard)
return m.Run()
}
os.Exit(run())
m.Run()
}
func TestBootnode_OK(t *testing.T) {