mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
test: fix ineffectual assignments
Signed-off-by: Yang Li <idealhack@gmail.com>
This commit is contained in:
parent
350fc8fc17
commit
f6d9d22e6f
1 changed files with 6 additions and 0 deletions
|
@ -48,6 +48,9 @@ func TestAddedCallback(t *testing.T) {
|
||||||
if !added {
|
if !added {
|
||||||
t.Fatal("Expecting an Added callback notification. But none received")
|
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) {
|
func TestRemovedCallback(t *testing.T) {
|
||||||
|
@ -58,6 +61,9 @@ func TestRemovedCallback(t *testing.T) {
|
||||||
added := false
|
added := false
|
||||||
removed := false
|
removed := false
|
||||||
hd.processCallback(update, func() {}, func(hosts []net.IP) { added = true }, func(hosts []net.IP) { removed = true })
|
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 {
|
if !removed {
|
||||||
t.Fatal("Expecting a Removed callback notification. But none received")
|
t.Fatal("Expecting a Removed callback notification. But none received")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue