This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
orion/openwrt/wifi_cell_test.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")
}