@@ -2,15 +2,15 @@ package tests
2
2
3
3
import (
4
4
"context"
5
- path "github.com/ipfs/interface-go-ipfs-core/path"
6
5
"io"
7
6
"math/rand"
8
7
gopath "path"
9
8
"testing"
10
9
"time"
11
10
12
- "github.com/ipfs/go-ipfs-files"
13
- ipath "github.com/ipfs/go-path"
11
+ path "github.com/ipfs/interface-go-ipfs-core/path"
12
+
13
+ files "github.com/ipfs/go-ipfs-files"
14
14
15
15
coreiface "github.com/ipfs/interface-go-ipfs-core"
16
16
opt "github.com/ipfs/interface-go-ipfs-core/options"
@@ -70,8 +70,8 @@ func (tp *TestSuite) TestPublishResolve(t *testing.T) {
70
70
t .Fatal (err )
71
71
}
72
72
73
- if e .Name () != self .ID (). Pretty ( ) {
74
- t .Errorf ("expected e.Name to equal '%s', got '%s'" , self .ID (). Pretty ( ), e .Name ())
73
+ if e .Name () != coreiface . FormatKeyID ( self .ID ()) {
74
+ t .Errorf ("expected e.Name to equal '%s', got '%s'" , coreiface . FormatKeyID ( self .ID ()), e .Name ())
75
75
}
76
76
77
77
if e .Value ().String () != p .String () {
@@ -100,8 +100,8 @@ func (tp *TestSuite) TestPublishResolve(t *testing.T) {
100
100
t .Fatal (err )
101
101
}
102
102
103
- if e .Name () != self .ID (). Pretty ( ) {
104
- t .Errorf ("expected e.Name to equal '%s', got '%s'" , self .ID (). Pretty ( ), e .Name ())
103
+ if e .Name () != coreiface . FormatKeyID ( self .ID ()) {
104
+ t .Errorf ("expected e.Name to equal '%s', got '%s'" , coreiface . FormatKeyID ( self .ID ()), e .Name ())
105
105
}
106
106
107
107
if e .Value ().String () != p .String ()+ "/test" {
@@ -130,8 +130,8 @@ func (tp *TestSuite) TestPublishResolve(t *testing.T) {
130
130
t .Fatal (err )
131
131
}
132
132
133
- if e .Name () != self .ID (). Pretty ( ) {
134
- t .Errorf ("expected e.Name to equal '%s', got '%s'" , self .ID (). Pretty ( ), e .Name ())
133
+ if e .Name () != coreiface . FormatKeyID ( self .ID ()) {
134
+ t .Errorf ("expected e.Name to equal '%s', got '%s'" , coreiface . FormatKeyID ( self .ID ()), e .Name ())
135
135
}
136
136
137
137
if e .Value ().String () != p .String () {
@@ -160,8 +160,8 @@ func (tp *TestSuite) TestPublishResolve(t *testing.T) {
160
160
t .Fatal (err )
161
161
}
162
162
163
- if e .Name () != self .ID (). Pretty ( ) {
164
- t .Errorf ("expected e.Name to equal '%s', got '%s'" , self .ID (). Pretty ( ), e .Name ())
163
+ if e .Name () != coreiface . FormatKeyID ( self .ID ()) {
164
+ t .Errorf ("expected e.Name to equal '%s', got '%s'" , coreiface . FormatKeyID ( self .ID ()), e .Name ())
165
165
}
166
166
167
167
if e .Value ().String () != p .String ()+ "/a" {
@@ -212,8 +212,8 @@ func (tp *TestSuite) TestBasicPublishResolveKey(t *testing.T) {
212
212
t .Fatal (err )
213
213
}
214
214
215
- if ipath . Join ([] string { "/ipns" , e .Name ()}) != k . Path (). String ( ) {
216
- t .Errorf ("expected e.Name to equal '%s' , got '%s'" , e .Name (), k . Path (). String ( ))
215
+ if e .Name () != coreiface . FormatKey ( k ) {
216
+ t .Errorf ("expected e.Name to equal %s , got '%s'" , e .Name (), coreiface . FormatKey ( k ))
217
217
}
218
218
219
219
if e .Value ().String () != p .String () {
@@ -255,8 +255,8 @@ func (tp *TestSuite) TestBasicPublishResolveTimeout(t *testing.T) {
255
255
t .Fatal (err )
256
256
}
257
257
258
- if e .Name () != self .ID (). Pretty ( ) {
259
- t .Errorf ("expected e.Name to equal '%s', got '%s'" , self .ID (). Pretty ( ), e .Name ())
258
+ if e .Name () != coreiface . FormatKeyID ( self .ID ()) {
259
+ t .Errorf ("expected e.Name to equal '%s', got '%s'" , coreiface . FormatKeyID ( self .ID ()), e .Name ())
260
260
}
261
261
262
262
if e .Value ().String () != p .String () {
0 commit comments