towerops/test
Graham McIntire 9c2efec473
test: add coverage for MikroTik wrong unit type override
Adds test case for the real-world scenario where MikroTik devices
report incorrect mtxrGaugeUnit values (e.g., reporting unit type 1
for celsius/temperature when the sensor is actually a voltage sensor).

This test verifies that the name-based override logic in
maybe_override_sensor_type/2 correctly handles this case:
- Sensor name: "psu1-voltage" or "psu2-voltage"
- Reported unit type: 1 (celsius/temperature)
- Expected result: voltage sensor with divisor 10

The override code was added in commit f402dcb (Jan 22, 2026) and
works correctly for new discoveries. Existing sensors created before
this date need the migration from commit 68a4ebf to fix their values.

Related: 20260125182836_fix_misclassified_mikrotik_voltage_sensors.exs

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 12:34:19 -06:00
..
integration refactor: simplify job architecture from Oban coordinators to direct workers 2026-01-24 16:36:57 -06:00
snmpkit refactor: alias DiscoveryWorker at module top and skip flaky performance test 2026-01-25 09:14:07 -06:00
support use password for user regi 2026-01-21 09:13:08 -06:00
towerops test: add coverage for MikroTik wrong unit type override 2026-01-25 12:34:19 -06:00
towerops_web add multiple cloud agents 2026-01-23 18:04:01 -06:00
test_helper.exs bring in snmpkit 2026-01-23 12:52:17 -06:00