release: prepare production client deployment

This commit is contained in:
2026-07-23 15:35:07 +00:00
parent 7cd7a747f0
commit fbb7eb5d9c
14 changed files with 279 additions and 7 deletions
+22
View File
@@ -40,6 +40,28 @@ class RouteDiscoveryTests(unittest.TestCase):
self.assertEqual(routes[1].local_relative_path, "routes/b")
self.assertFalse(routes[1].archive_control_created)
def test_home_relative_paths_are_normalized_under_api_root(self):
with tempfile.TemporaryDirectory() as directory:
roots = RootMapping(PurePosixPath("/var/syncthing"), Path(directory))
routes = discover_routes(
{"folders": [{
"id": "DownloadsSync",
"path": "~/DownloadsSync",
"type": "sendreceive",
"devices": [
{"deviceID": "LOCAL"},
{"deviceID": "ARCHIVE"},
],
}]},
"LOCAL",
roots,
True,
)
self.assertEqual(len(routes), 1)
self.assertEqual(routes[0].route_id, "DownloadsSync")
self.assertEqual(routes[0].local_relative_path, "DownloadsSync")
self.assertEqual(routes[0].state, route_pb2.ROUTE_STATE_DISCOVERED)
if __name__ == "__main__":
unittest.main()
+13 -1
View File
@@ -6,7 +6,11 @@ from pathlib import Path, PurePosixPath
from unittest.mock import patch
from archive_clients.config import ServiceConfig
from archive_clients.services import probe_qbittorrent, probe_syncthing
from archive_clients.services import (
_supported_qb_version,
probe_qbittorrent,
probe_syncthing,
)
from archive_control.v1 import common_pb2
@@ -39,6 +43,14 @@ class _Opener:
class ServiceProbeTests(unittest.TestCase):
def test_supported_qbittorrent_versions_include_live_4_4_api(self):
for version in ("v4.4.5", "v4.5.5", "v4.6.7", "v5.2.3"):
with self.subTest(version=version):
self.assertTrue(_supported_qb_version(version))
for version in ("v4.3.9", "v6.0.0", "invalid"):
with self.subTest(version=version):
self.assertFalse(_supported_qb_version(version))
def test_qbittorrent_versions_are_normalized(self):
with tempfile.TemporaryDirectory() as directory:
root = Path(directory)