Skip to content

Commit

Permalink
TestMain in pkg/transport added
Browse files Browse the repository at this point in the history
  • Loading branch information
ayuryshev committed Jun 18, 2019
1 parent eef1621 commit e9147f7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkg/transport/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import (
"context"
"fmt"
"io"
"log"
"os"
"sync"
"testing"
"time"
Expand All @@ -12,9 +14,25 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/skycoin/skycoin/src/util/logging"
"github.com/skycoin/skywire/pkg/cipher"
)

func TestMain(m *testing.M) {
loggingLevel, ok := os.LookupEnv("TEST_LOGGING_LEVEL")
if ok {
lvl, err := logging.LevelFromString(loggingLevel)
if err != nil {
log.Fatal(err)
}
logging.SetLevel(lvl)
} else {
logging.Disable()
}

os.Exit(m.Run())
}

func TestTransportManager(t *testing.T) {
client := NewDiscoveryMock()
logStore := InMemoryTransportLogStore()
Expand Down

0 comments on commit e9147f7

Please sign in to comment.