Skip to content

Commit

Permalink
test: fix ineffectual assignments
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Li <[email protected]>
  • Loading branch information
idealhack committed May 29, 2018
1 parent 8436c5c commit a3730f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hostdiscovery/hostdiscovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func TestAddedCallback(t *testing.T) {
if !added {
t.Fatal("Expecting an Added callback notification. But none received")
}
if removed {
t.Fatal("Not expecting a Removed callback notification. But received a callback")
}
}

func TestRemovedCallback(t *testing.T) {
Expand All @@ -58,6 +61,9 @@ func TestRemovedCallback(t *testing.T) {
added := false
removed := false
hd.processCallback(update, func() {}, func(hosts []net.IP) { added = true }, func(hosts []net.IP) { removed = true })
if added {
t.Fatal("Not expecting an Added callback notification. But received a callback")
}
if !removed {
t.Fatal("Expecting a Removed callback notification. But none received")
}
Expand Down

0 comments on commit a3730f8

Please sign in to comment.