File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import (
1313 "github.com/ipfs/kubo/config"
1414 "github.com/ipfs/kubo/test/cli/harness"
1515 . "github.com/ipfs/kubo/test/cli/testutils"
16+ "github.com/libp2p/go-libp2p/core/peer"
1617 "github.com/multiformats/go-multiaddr"
1718 manet "github.com/multiformats/go-multiaddr/net"
1819 "github.com/stretchr/testify/assert"
@@ -28,7 +29,7 @@ func TestGateway(t *testing.T) {
2829 client := node .GatewayClient ()
2930 client .TemplateData = map [string ]string {
3031 "CID" : cid ,
31- "PeerID" : node .PeerID ().String (),
32+ "PeerID" : peer . ToCid ( node .PeerID () ).String (),
3233 }
3334
3435 t .Run ("GET IPFS path succeeds" , func (t * testing.T ) {
@@ -182,7 +183,7 @@ func TestGateway(t *testing.T) {
182183 t .Run ("GET /ipfs/ipns/{peerid} returns redirect to the valid path" , func (t * testing.T ) {
183184 t .Parallel ()
184185 resp := client .Get ("/ipfs/ipns/{{.PeerID}}?query=to-remember" )
185- peerID := node .PeerID ().String ()
186+ peerID := peer . ToCid ( node .PeerID () ).String ()
186187 assert .Contains (t ,
187188 resp .Body ,
188189 fmt .Sprintf (`<meta http-equiv="refresh" content="10;url=/ipns/%s?query=to-remember" />` , peerID ),
You can’t perform that action at this time.
0 commit comments