Improve remote session management and Windows support

This commit is contained in:
2026-09-03 12:58:24 +00:00
parent 6c2c9672e1
commit 02d83a04bd
12 changed files with 2342 additions and 146 deletions
+31 -1
View File
@@ -39,12 +39,37 @@ class EndpointTests(unittest.TestCase):
"work",
],
)
self.assertEqual(
Endpoint.remote(
"ssh://me@windows:2222",
"work",
remote_transport="ssh",
).command("/bin/herdr", "/bin/ssh"),
[
"/bin/ssh",
"-tt",
"-o",
"ServerAliveInterval=15",
"-o",
"ServerAliveCountMax=3",
"-p",
"2222",
"-l",
"me",
"windows",
"herdr --session work",
],
)
def test_identity_ignores_remote_keybinding_mode(self) -> None:
local = Endpoint.remote("orangepi", remote_keybindings="local")
server = Endpoint.remote("orangepi", remote_keybindings="server")
self.assertEqual(local.key, server.key)
self.assertEqual(dedupe_endpoints([local, server]), [local])
self.assertEqual(
Endpoint.remote("orangepi").key,
Endpoint.remote("orangepi", remote_transport="ssh").key,
)
def test_short_labels_put_the_host_first_and_omit_default(self) -> None:
self.assertEqual(Endpoint.local().short_label, "local")
@@ -67,7 +92,12 @@ class EndpointTests(unittest.TestCase):
)
def test_endpoint_metadata_and_legacy_command_round_trip(self) -> None:
endpoint = Endpoint.remote("ssh://me@host:2222", "work", "server")
endpoint = Endpoint.remote(
"ssh://me@host:2222",
"work",
"server",
"ssh",
)
self.assertEqual(deserialize_endpoint(serialize_endpoint(endpoint)), endpoint)
self.assertEqual(
deserialize_endpoint(