mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
add test for GetClient
This commit is contained in:
parent
07ba5e8d57
commit
6911941fa2
1 changed files with 12 additions and 0 deletions
|
@ -116,3 +116,15 @@ func TestWiFiGet(t *testing.T) {
|
||||||
t.Error("unable to get access point from wifi struct with mac address")
|
t.Error("unable to get access point from wifi struct with mac address")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestWiFiGetClient(t *testing.T) {
|
||||||
|
exampleWiFi := buildExampleWiFi()
|
||||||
|
exampleAP := NewAccessPoint("my_wifi", "ff:ff:ff:ff:ff:ff", 2472, int8(0))
|
||||||
|
exampleClient := NewStation("my_wifi", "ff:ff:ff:ff:ff:xx", 2472, int8(0))
|
||||||
|
exampleAP.clients["ff:ff:ff:ff:ff:xx"] = exampleClient
|
||||||
|
exampleWiFi.aps["ff:ff:ff:ff:ff:ff"] = exampleAP
|
||||||
|
_, found := exampleWiFi.GetClient("ff:ff:ff:ff:ff:xx")
|
||||||
|
if !found {
|
||||||
|
t.Error("unable to get client from wifi struct with mac address")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue