release: prepare production client deployment
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user