Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
f6d507b2
Commit
f6d507b2
authored
Jan 21, 2018
by
Dirk McCormick
Committed by
Steven Allen
Jan 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go fmt
License: MIT Signed-off-by:
Dirk McCormick
<
dirkmdev@gmail.com
>
parent
b90d7bd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
namesys/ipns_validate_test.go
namesys/ipns_validate_test.go
+0
-5
No files found.
namesys/ipns_validate_test.go
View file @
f6d507b2
...
@@ -45,7 +45,6 @@ func TestValidation(t *testing.T) {
...
@@ -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) {
...
@@ -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) {
...
@@ -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) {
...
@@ -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) {
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment