22 lines
496 B
Go
22 lines
496 B
Go
package openwrt
|
|
|
|
import "testing"
|
|
|
|
func TestWifiCellConnection(t *testing.T) {
|
|
uexec := createMockExecutor("", "", 0)
|
|
uci := NewUCIWithExecutor(uexec)
|
|
|
|
cellList := `Cell 40 - Address: 68:A3:78:6E:D9:24
|
|
ESSID: "PyxisWifi"
|
|
Mode: Master Channel: 3
|
|
Signal: -90 dBm Quality: 20/70
|
|
Encryption: WPA2 PSK (CCMP)`
|
|
|
|
exec := createMockExecutor(cellList, "", 0)
|
|
wifi := NewWifiWithExecutor(exec, "wlan1")
|
|
_ = wifi.GetWifiCells()
|
|
|
|
cell := wifi.GetCell("PyxisWifi")
|
|
cell.Connect(uci, "secret")
|
|
}
|