mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-23 21:47:52 +08:00
fixed resolver test
This commit is contained in:
@ -26,6 +26,12 @@ func TestRoutingResolve(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
err = publisher.Publish(privk, "Hello")
|
err = publisher.Publish(privk, "Hello")
|
||||||
|
if err == nil {
|
||||||
|
t.Fatal("should have errored out when publishing a non-multihash val")
|
||||||
|
}
|
||||||
|
|
||||||
|
h := u.Key(u.Hash([]byte("Hello"))).Pretty()
|
||||||
|
err = publisher.Publish(privk, h)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -41,7 +47,7 @@ func TestRoutingResolve(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if res != "Hello" {
|
if res != h {
|
||||||
t.Fatal("Got back incorrect value.")
|
t.Fatal("Got back incorrect value.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user