Skip to content

Commit d17449d

Browse files
committed
fix: do not use b58mh peer id for ipns test
1 parent 55587d8 commit d17449d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/cli/gateway_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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),

0 commit comments

Comments
 (0)