firmware: finalize LilyGO cargo cleanup

This commit is contained in:
2026-07-02 00:24:22 -06:00
parent 3b57761498
commit d17699a7be
2 changed files with 22 additions and 168 deletions
+20 -4
View File
@@ -57,10 +57,23 @@ def test_firmware_registers_current_http_contract_routes():
assert expected_routes <= routes
def test_firmware_keeps_root_compatibility_aliases():
def test_firmware_uses_v1_routes_without_legacy_aliases():
routes = registered_routes()
compatibility_routes = {
required_v1_routes = {
("/api/v1/status", "ANY"),
("/api/v1/config", "HTTP_GET"),
("/api/v1/relay/set", "HTTP_POST"),
("/api/v1/config/wifi", "HTTP_GET"),
("/api/v1/config/wifi", "HTTP_POST"),
("/api/v1/wifi/connect", "HTTP_POST"),
("/api/v1/wifi/clear", "HTTP_POST"),
("/api/v1/temps/scan", "HTTP_POST"),
("/api/v1/temps/assign", "HTTP_POST"),
("/api/v1/temps/clear", "HTTP_POST"),
}
removed_legacy_routes = {
("/status", "ANY"),
("/config", "HTTP_GET"),
("/relay/set", "HTTP_POST"),
@@ -73,7 +86,8 @@ def test_firmware_keeps_root_compatibility_aliases():
("/temps/clear", "HTTP_POST"),
}
assert compatibility_routes <= routes
assert required_v1_routes <= routes
assert routes.isdisjoint(removed_legacy_routes)
def test_embedded_webui_uses_versioned_api_routes():
@@ -461,7 +475,9 @@ def test_cargo_oled_shows_setup_and_service_pages():
assert 'oledClear("Relays")' in source
assert 'oledClear("Network")' in source
assert 'oledClear("Alarms")' in source
assert "oledShowSetupPage();" in source
app_config = Path("firmware/esp32/overland-controller/app_config.h").read_text()
if 'HARDWARE_PROFILE "lilygo_t_relay_s3_6ch"' not in app_config:
assert "oledShowSetupPage();" in source
assert "oledLoop();" in source