@cryptotaxi247 / kubo / commits / 2d2aee150

fix(daemon) multiaddr in test

Brian Tiger Chow committed Sep 22, 2014 at 04:23 UTC 2d2aee150827fc9e9db7fecd6c02c4323dbf5c02
1 file changed +10 -4
daemon/daemon_test.go
+10 -4
@@ -2,11 +2,13 @@ package daemon
2
3 import (
4 "encoding/base64"
5 + "testing"
6 +
7 + ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
8 config "github.com/jbenet/go-ipfs/config"
9 core "github.com/jbenet/go-ipfs/core"
10 ci "github.com/jbenet/go-ipfs/crypto"
8 - identify "github.com/jbenet/go-ipfs/identify"
9 - "testing"
11 + spipe "github.com/jbenet/go-ipfs/crypto/spipe"
12 )
13
14 func TestInitializeDaemonListener(t *testing.T) {
@@ -20,7 +22,7 @@ func TestInitializeDaemonListener(t *testing.T) {
22 t.Fatal(err)
23 }
24
23 - ident, _ := identify.IDFromPubKey(pub)
25 + ident, _ := spipe.IDFromPubKey(pub)
26 privKey := base64.StdEncoding.EncodeToString(prbytes)
27 pID := ident.Pretty()
28
@@ -50,7 +52,11 @@ func TestInitializeDaemonListener(t *testing.T) {
52 for _, c := range nodeConfigs {
53
54 node, _ := core.NewIpfsNode(c, false)
53 - dl, initErr := NewDaemonListener(node, "localhost:1327")
55 + addr, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/1327")
56 + if err != nil {
57 + t.Fatal(err)
58 + }
59 + dl, initErr := NewDaemonListener(node, addr)
60 if initErr != nil {
61 t.Fatal(initErr)
62 }