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-routing
Commits
eb90de89
Commit
eb90de89
authored
Sep 14, 2014
by
Siraj Ravel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for getLocal method in DHT
parent
9fe70ae2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
dht/dht_test.go
dht/dht_test.go
+6
-0
No files found.
dht/dht_test.go
View file @
eb90de89
...
@@ -179,6 +179,7 @@ func TestValueGetSet(t *testing.T) {
...
@@ -179,6 +179,7 @@ func TestValueGetSet(t *testing.T) {
if
string
(
val
)
!=
"world"
{
if
string
(
val
)
!=
"world"
{
t
.
Fatalf
(
"Expected 'world' got '%s'"
,
string
(
val
))
t
.
Fatalf
(
"Expected 'world' got '%s'"
,
string
(
val
))
}
}
}
}
func
TestProvides
(
t
*
testing
.
T
)
{
func
TestProvides
(
t
*
testing
.
T
)
{
...
@@ -206,6 +207,11 @@ func TestProvides(t *testing.T) {
...
@@ -206,6 +207,11 @@ func TestProvides(t *testing.T) {
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
}
}
_
,
err
=
dhts
[
3
]
.
getLocal
(
u
.
Key
(
"hello"
))
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
err
=
dhts
[
3
]
.
Provide
(
u
.
Key
(
"hello"
))
err
=
dhts
[
3
]
.
Provide
(
u
.
Key
(
"hello"
))
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatal
(
err
)
t
.
Fatal
(
err
)
...
...
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