feat: add multi-device provisioning and local remote-config UI

- add multi-device portal device management, key rotation, and sync request APIs
- add Pi settings UI for remote server URL, device name, and API key
- add local test-connection and sync-now actions
- make upload and config sync reuse dynamic shared credentials
- add Phase 25.5c migration and docs updates

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Mathieu Moran
2026-08-10 18:02:09 -04:00
co-authored by Copilot
parent fbc41a5db5
commit ba682fbf3a
23 changed files with 1357 additions and 167 deletions
+7 -11
View File
@@ -1,5 +1,4 @@
import unittest
import os
from unittest.mock import Mock, patch
from modules import app_account, app_car, app_device_sync
@@ -56,16 +55,13 @@ class DeviceSyncReloadCallbackTest(unittest.TestCase):
finally:
app_device_sync._RELOAD_CALLBACK = original
@patch.dict(
os.environ,
{
"YARIS_SERVER_URL": "https://example.test",
"YARIS_DEVICE_NAME": "yaris-2013",
"YARIS_API_KEY": "upload-key",
},
clear=True,
)
def test_sync_credentials_fall_back_to_upload_api_key(self):
@patch("modules.app_remote_config.server_credentials")
def test_sync_credentials_fall_back_to_upload_api_key(self, server_credentials):
server_credentials.return_value = {
"server_url": "https://example.test",
"device_name": "yaris-2013",
"api_key": "upload-key",
}
server_url, device_name, device_key = app_device_sync._server_credentials()
self.assertEqual(server_url, "https://example.test")