fix(remote): map a cut-off answer to a recoverable error and stop trusting an empty optional answer

This commit is contained in:
imSp4rky
2026-11-28 21:03:54 -07:00
parent 74fa29b6f1
commit f5c8858e6e
12 changed files with 279 additions and 76 deletions
+8
View File
@@ -152,3 +152,11 @@ def test_resolve_proxy_value_error_becomes_click(monkeypatch: pytest.MonkeyPatch
with pytest.raises(click.ClickException) as exc:
resolve_proxy_arg("xx")
assert "no such country" in str(exc.value.message)
def test_resolve_server_leaves_the_config_services_untouched(single_remote_service) -> None:
from unshackle.core import remote_service as rs
_, _, services = resolve_server("primary")
assert services["_server_cdm"] is True
assert rs.config.remote_services["primary"]["services"] == {"EXAMPLE": True, "DEMO": True}