mirror of
https://github.com/henrygd/beszel.git
synced 2026-10-01 05:47:48 +02:00
wifi: omit empty info snapshot and tidy up
- Info.WiFi uses json "wf" with omitempty so systems without Wi-Fi no longer store/broadcast "wifi":null - move osascript exec into wifi_darwin.go; drop unused commandRunner - share strongest-connection logic between table cell and sorting - trim agent/wifi README
This commit is contained in:
@@ -33,8 +33,8 @@ func TestWiFiWireSnapshot(t *testing.T) {
|
||||
if err = json.Unmarshal(encoded, &info); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, ok := info["wifi"]; !ok {
|
||||
t.Fatal("current absence must be explicit")
|
||||
if _, ok := info["wf"]; ok != (len(wifi) > 0) {
|
||||
t.Fatalf("wf present = %v for snapshot %v", ok, wifi)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user