1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 17:36:38 +08:00
License: MIT
Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
This commit is contained in:
Dirk McCormick
2018-01-21 17:48:57 -05:00
committed by Steven Allen
parent b90d7bd7b0
commit f6d507b203

View File

@ -45,7 +45,6 @@ func TestValidation(t *testing.T) {
t.Fatal(err)
}
// Create IPNS record path with a different key
_, ipnsWrongAuthor := genKeys(t, r)
wrongAuthorRec, err := record.MakePutRecord(priv, ipnsWrongAuthor, val, true)
@ -59,7 +58,6 @@ func TestValidation(t *testing.T) {
t.Fatal("ValidateIpnsRecord should have returned ErrInvalidAuthor")
}
// Create IPNS record path with extra path components after author
extraPath := ipnsPath + "/some/path"
extraPathRec, err := record.MakePutRecord(priv, extraPath, val, true)
@ -73,7 +71,6 @@ func TestValidation(t *testing.T) {
t.Fatal("ValidateIpnsRecord should have returned ErrInvalidAuthor")
}
// Create unsigned IPNS record
unsignedRec, err := record.MakePutRecord(priv, ipnsPath, val, false)
if err != nil {
@ -86,7 +83,6 @@ func TestValidation(t *testing.T) {
t.Fatal("ValidateIpnsRecord should have returned ErrInvalidAuthor")
}
// Create unsigned IPNS record with no author
unsignedRecNoAuthor, err := record.MakePutRecord(priv, ipnsPath, val, false)
if err != nil {
@ -101,7 +97,6 @@ func TestValidation(t *testing.T) {
t.Fatal("ValidateIpnsRecord should have returned ErrInvalidAuthor")
}
// Create expired entry
expiredEntry, err := CreateRoutingEntryData(priv, path.Path("foo"), 1, ts.Add(-1*time.Hour))
if err != nil {