From 2d2aee150827fc9e9db7fecd6c02c4323dbf5c02 Mon Sep 17 00:00:00 2001 From: Brian Tiger Chow Date: Mon, 22 Sep 2014 04:23:55 -0700 Subject: [PATCH] fix(daemon) multiaddr in test --- daemon/daemon_test.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/daemon/daemon_test.go b/daemon/daemon_test.go index c399c66fc..b509bb76c 100644 --- a/daemon/daemon_test.go +++ b/daemon/daemon_test.go @@ -2,11 +2,13 @@ package daemon import ( "encoding/base64" + "testing" + + ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" config "github.com/jbenet/go-ipfs/config" core "github.com/jbenet/go-ipfs/core" ci "github.com/jbenet/go-ipfs/crypto" - identify "github.com/jbenet/go-ipfs/identify" - "testing" + spipe "github.com/jbenet/go-ipfs/crypto/spipe" ) func TestInitializeDaemonListener(t *testing.T) { @@ -20,7 +22,7 @@ func TestInitializeDaemonListener(t *testing.T) { t.Fatal(err) } - ident, _ := identify.IDFromPubKey(pub) + ident, _ := spipe.IDFromPubKey(pub) privKey := base64.StdEncoding.EncodeToString(prbytes) pID := ident.Pretty() @@ -50,7 +52,11 @@ func TestInitializeDaemonListener(t *testing.T) { for _, c := range nodeConfigs { node, _ := core.NewIpfsNode(c, false) - dl, initErr := NewDaemonListener(node, "localhost:1327") + addr, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/1327") + if err != nil { + t.Fatal(err) + } + dl, initErr := NewDaemonListener(node, addr) if initErr != nil { t.Fatal(initErr) }