mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 04:59:25 -07:00
add test for Aliases
This commit is contained in:
parent
a3e173a847
commit
50ebf3e53a
1 changed files with 12 additions and 0 deletions
|
@ -107,3 +107,15 @@ func TestList(t *testing.T) {
|
||||||
t.Fatalf("expected '%d', got '%d'", exp, got)
|
t.Fatalf("expected '%d', got '%d'", exp, got)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestAliases(t *testing.T) {
|
||||||
|
exampleAlias := "picat"
|
||||||
|
exampleLAN := buildExampleLAN()
|
||||||
|
exampleEndpoint := buildExampleEndpoint()
|
||||||
|
exampleLAN.hosts[exampleEndpoint.HwAddress] = exampleEndpoint
|
||||||
|
exp := exampleAlias
|
||||||
|
got := exampleLAN.Aliases().Get(exampleEndpoint.HwAddress)
|
||||||
|
if got != exp {
|
||||||
|
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue