Files
the-other-dude/poller/internal/device/rf_monitor_test.go
Jason Staack caa33ca8d7 feat(12-01): add RF monitor collector, WIRELESS_REGISTRATIONS stream, wire into poll cycle
- RFMonitorStats struct for per-interface RF data (noise floor, channel width, TX power)
- CollectRFMonitor with v6/v7 RouterOS version routing
- WIRELESS_REGISTRATIONS NATS stream with 30-day retention (separate from DEVICE_EVENTS)
- WirelessRegistrationEvent type and PublishWirelessRegistrations method
- Poll cycle collects per-client registrations and RF stats, publishes combined event

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 05:38:14 -05:00

33 lines
767 B
Go

package device
import (
"testing"
)
func TestRFMonitorStatsFields(t *testing.T) {
// Compilation test: ensure RFMonitorStats has all required fields
// with correct types.
stats := RFMonitorStats{
Interface: "wlan1",
NoiseFloor: -105,
ChannelWidth: "20MHz",
TxPower: 24,
RegisteredClients: 15,
}
if stats.Interface != "wlan1" {
t.Error("Interface field not set correctly")
}
if stats.NoiseFloor != -105 {
t.Error("NoiseFloor field not set correctly")
}
if stats.ChannelWidth != "20MHz" {
t.Error("ChannelWidth field not set correctly")
}
if stats.TxPower != 24 {
t.Error("TxPower field not set correctly")
}
if stats.RegisteredClients != 15 {
t.Error("RegisteredClients field not set correctly")
}
}