mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 02:30:39 +08:00
go fmt
License: MIT Signed-off-by: Dirk McCormick <dirkmdev@gmail.com>
This commit is contained in:

committed by
Steven Allen

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