Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
5929ab24
Commit
5929ab24
authored
3 years ago
by
Jono Wenger
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests
parent
677def42
No related branches found
No related tags found
3 merge requests
!510
Release
,
!207
WIP: Client Restructure
,
!203
Symmetric broadcast
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
network/message/fingerprints.go
+1
-1
1 addition, 1 deletion
network/message/fingerprints.go
network/message/fingerprints_test.go
+4
-2
4 additions, 2 deletions
network/message/fingerprints_test.go
network/nodes/register.go
+1
-1
1 addition, 1 deletion
network/nodes/register.go
with
6 additions
and
4 deletions
network/message/fingerprints.go
+
1
−
1
View file @
5929ab24
...
@@ -23,7 +23,7 @@ type FingerprintsManager struct {
...
@@ -23,7 +23,7 @@ type FingerprintsManager struct {
sync
.
Mutex
sync
.
Mutex
}
}
// newFingerprints is a constructor function for the
f
ingerprints
track
er.
// newFingerprints is a constructor function for the
F
ingerprints
Manag
er.
func
newFingerprints
(
standardID
*
id
.
ID
)
*
FingerprintsManager
{
func
newFingerprints
(
standardID
*
id
.
ID
)
*
FingerprintsManager
{
return
&
FingerprintsManager
{
return
&
FingerprintsManager
{
fpMap
:
make
(
map
[
id
.
ID
]
map
[
format
.
Fingerprint
]
Processor
),
fpMap
:
make
(
map
[
id
.
ID
]
map
[
format
.
Fingerprint
]
Processor
),
...
...
This diff is collapsed.
Click to expand it.
network/message/fingerprints_test.go
+
4
−
2
View file @
5929ab24
...
@@ -20,11 +20,13 @@ import (
...
@@ -20,11 +20,13 @@ import (
// Unit test.
// Unit test.
func
Test_newFingerprints
(
t
*
testing
.
T
)
{
func
Test_newFingerprints
(
t
*
testing
.
T
)
{
sid
:=
id
.
NewIdFromString
(
"testID"
,
id
.
User
,
t
)
expected
:=
&
FingerprintsManager
{
expected
:=
&
FingerprintsManager
{
fpMap
:
make
(
map
[
id
.
ID
]
map
[
format
.
Fingerprint
]
Processor
),
fpMap
:
make
(
map
[
id
.
ID
]
map
[
format
.
Fingerprint
]
Processor
),
standardID
:
sid
,
}
}
received
:=
newFingerprints
(
&
id
.
ID
{}
)
received
:=
newFingerprints
(
s
id
)
if
!
reflect
.
DeepEqual
(
expected
,
received
)
{
if
!
reflect
.
DeepEqual
(
expected
,
received
)
{
t
.
Fatalf
(
"New FingerprintsManager did not match expected."
+
t
.
Fatalf
(
"New FingerprintsManager did not match expected."
+
"
\n
expected: %+v
\n
received: %+v"
,
expected
,
received
)
"
\n
expected: %+v
\n
received: %+v"
,
expected
,
received
)
...
...
This diff is collapsed.
Click to expand it.
network/nodes/register.go
+
1
−
1
View file @
5929ab24
...
@@ -108,7 +108,7 @@ func registerWithNode(sender gateway.Sender, comms RegisterNodeCommsInterface,
...
@@ -108,7 +108,7 @@ func registerWithNode(sender gateway.Sender, comms RegisterNodeCommsInterface,
nodeID
,
err
:=
ngw
.
Node
.
GetNodeId
()
nodeID
,
err
:=
ngw
.
Node
.
GetNodeId
()
if
err
!=
nil
{
if
err
!=
nil
{
jww
.
ERROR
.
Print
(
"registerWithNode failed to decode node ID: %v"
,
err
)
jww
.
ERROR
.
Print
f
(
"registerWithNode failed to decode node ID: %v"
,
err
)
return
err
return
err
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment