mirror of
https://github.com/bettercap/bettercap
synced 2025-07-12 08:07:00 -07:00
add test for SetAliasFor
This commit is contained in:
parent
bb493de4c9
commit
29486e1bf7
1 changed files with 10 additions and 0 deletions
|
@ -69,3 +69,13 @@ func TestMarshalJSON(t *testing.T) {
|
|||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSetAliasFor(t *testing.T) {
|
||||
exampleAlias := "picat"
|
||||
exampleLAN := buildExampleLAN()
|
||||
exampleEndpoint := buildExampleEndpoint()
|
||||
exampleLAN.hosts[exampleEndpoint.HwAddress] = exampleEndpoint
|
||||
if !exampleLAN.SetAliasFor(exampleEndpoint.HwAddress, exampleAlias) {
|
||||
t.Error("unable to set alias for a given mac address")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue