mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
add test for shouldIgnore
This commit is contained in:
parent
d641fbf5c3
commit
d3c8afb3fb
1 changed files with 15 additions and 0 deletions
|
@ -192,3 +192,18 @@ func TestGetAlias(t *testing.T) {
|
|||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestShouldIgnore(t *testing.T) {
|
||||
exampleLAN := buildExampleLAN()
|
||||
iface, _ := FindInterface("")
|
||||
gateway, _ := FindGateway(iface)
|
||||
exp := true
|
||||
got := exampleLAN.shouldIgnore(iface.IpAddress, iface.HwAddress)
|
||||
if got != exp {
|
||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
got = exampleLAN.shouldIgnore(gateway.IpAddress, gateway.HwAddress)
|
||||
if got != exp {
|
||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue