Commit 2d2aee15 authored by Brian Tiger Chow's avatar Brian Tiger Chow

fix(daemon) multiaddr in test

parent 197046c9
...@@ -2,11 +2,13 @@ package daemon ...@@ -2,11 +2,13 @@ package daemon
import ( import (
"encoding/base64" "encoding/base64"
"testing"
ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
config "github.com/jbenet/go-ipfs/config" config "github.com/jbenet/go-ipfs/config"
core "github.com/jbenet/go-ipfs/core" core "github.com/jbenet/go-ipfs/core"
ci "github.com/jbenet/go-ipfs/crypto" ci "github.com/jbenet/go-ipfs/crypto"
identify "github.com/jbenet/go-ipfs/identify" spipe "github.com/jbenet/go-ipfs/crypto/spipe"
"testing"
) )
func TestInitializeDaemonListener(t *testing.T) { func TestInitializeDaemonListener(t *testing.T) {
...@@ -20,7 +22,7 @@ func TestInitializeDaemonListener(t *testing.T) { ...@@ -20,7 +22,7 @@ func TestInitializeDaemonListener(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
ident, _ := identify.IDFromPubKey(pub) ident, _ := spipe.IDFromPubKey(pub)
privKey := base64.StdEncoding.EncodeToString(prbytes) privKey := base64.StdEncoding.EncodeToString(prbytes)
pID := ident.Pretty() pID := ident.Pretty()
...@@ -50,7 +52,11 @@ func TestInitializeDaemonListener(t *testing.T) { ...@@ -50,7 +52,11 @@ func TestInitializeDaemonListener(t *testing.T) {
for _, c := range nodeConfigs { for _, c := range nodeConfigs {
node, _ := core.NewIpfsNode(c, false) 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 { if initErr != nil {
t.Fatal(initErr) t.Fatal(initErr)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment