From 5d702cf02dc6b2b5f8e97c04a3538bb607299b0c Mon Sep 17 00:00:00 2001 From: ivcosla Date: Wed, 4 Sep 2019 18:17:11 +0200 Subject: [PATCH] fix travis --- pkg/therealssh/pty_test.go | 3 ++- pkg/therealssh/server_test.go | 3 ++- pkg/visor/rpc_client.go | 3 ++- pkg/visor/rpc_test.go | 5 +++-- pkg/visor/visor_test.go | 15 ++++++++++----- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/pkg/therealssh/pty_test.go b/pkg/therealssh/pty_test.go index 6b8a727da6..d5483e7bad 100644 --- a/pkg/therealssh/pty_test.go +++ b/pkg/therealssh/pty_test.go @@ -12,8 +12,9 @@ import ( "github.com/creack/pty" "github.com/skycoin/dmsg/cipher" "github.com/skycoin/skycoin/src/util/logging" - "github.com/skycoin/skywire/pkg/routing" "github.com/stretchr/testify/require" + + "github.com/skycoin/skywire/pkg/routing" ) func TestRunRPC(t *testing.T) { diff --git a/pkg/therealssh/server_test.go b/pkg/therealssh/server_test.go index f39e09d64c..83663eb2d1 100644 --- a/pkg/therealssh/server_test.go +++ b/pkg/therealssh/server_test.go @@ -8,9 +8,10 @@ import ( "github.com/skycoin/dmsg/cipher" "github.com/skycoin/skycoin/src/util/logging" - "github.com/skycoin/skywire/pkg/routing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/skycoin/skywire/pkg/routing" ) func TestMain(m *testing.M) { diff --git a/pkg/visor/rpc_client.go b/pkg/visor/rpc_client.go index 7537d6dc1e..7a53be82cc 100644 --- a/pkg/visor/rpc_client.go +++ b/pkg/visor/rpc_client.go @@ -3,13 +3,14 @@ package visor import ( "encoding/binary" "fmt" - "github.com/skycoin/skywire/pkg/router" "math/rand" "net/http" "net/rpc" "sync" "time" + "github.com/skycoin/skywire/pkg/router" + "github.com/google/uuid" "github.com/skycoin/dmsg/cipher" "github.com/skycoin/skycoin/src/util/logging" diff --git a/pkg/visor/rpc_test.go b/pkg/visor/rpc_test.go index 6f467b898e..29215afdde 100644 --- a/pkg/visor/rpc_test.go +++ b/pkg/visor/rpc_test.go @@ -9,10 +9,11 @@ import ( "github.com/skycoin/dmsg/cipher" "github.com/skycoin/skycoin/src/util/logging" - "github.com/skycoin/skywire/pkg/routing" - "github.com/skycoin/skywire/pkg/util/pathutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/skycoin/skywire/pkg/routing" + "github.com/skycoin/skywire/pkg/util/pathutil" ) func TestHealth(t *testing.T) { diff --git a/pkg/visor/visor_test.go b/pkg/visor/visor_test.go index 9d3a42940e..27aee9048c 100644 --- a/pkg/visor/visor_test.go +++ b/pkg/visor/visor_test.go @@ -1,5 +1,3 @@ -// +build !no_ci - package visor import ( @@ -15,12 +13,13 @@ import ( "github.com/skycoin/dmsg/cipher" "github.com/skycoin/skycoin/src/util/logging" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/skycoin/skywire/pkg/app" "github.com/skycoin/skywire/pkg/routing" "github.com/skycoin/skywire/pkg/transport" "github.com/skycoin/skywire/pkg/util/pathutil" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) var masterLogger *logging.MasterLogger @@ -152,15 +151,21 @@ func TestNodeSpawnApp(t *testing.T) { } func TestNodeSpawnAppValidations(t *testing.T) { + pk, _ := cipher.GenerateKeyPair() conn, _ := net.Pipe() r := new(mockRouter) executer := &MockExecuter{err: errors.New("foo")} defer func() { require.NoError(t, os.RemoveAll("skychat")) }() + c := &Config{} + c.Node.StaticPubKey = pk node := &Node{router: r, executer: executer, startedApps: map[string]*appBind{"skychat": {conn, 10}}, - logger: logging.MustGetLogger("test")} + logger: logging.MustGetLogger("test"), + config: c, + } + defer os.Remove(node.dir()) // nolint cases := []struct { conf *AppConfig