Purge legacy CLI command aliases

This commit is contained in:
HumbleTurtle
2026-05-10 07:38:39 -03:00
parent 08c4096868
commit e7aed9ddf6
5 changed files with 68 additions and 120 deletions
+26
View File
@@ -33,6 +33,13 @@ def run():
assert mod.handle_gateway(["vault", "rotate-secret", "--kind", "chat"]) == 0
assert calls[-1] == ("gateway", ["vault", "rotate-secret", "--kind", "chat"])
try:
mod.handle_gateway(["config"])
except RuntimeError as exc:
assert "unknown gateway command" in str(exc)
else:
raise AssertionError("gateway config alias must not route")
try:
mod.handle_gateway(["vault-setup", "list"])
except RuntimeError as exc:
@@ -43,6 +50,25 @@ def run():
assert mod.handle_gateway(["terminal", "list"]) == 0
assert calls[-1] == ("gateway", ["terminal", "list"])
calls.clear()
assert mod.main(["nap", "status"]) == 0
assert calls[-1] == ("configure", [])
for argv in (
["nap", "config"],
["nap", "configure"],
["nap", "bootstrap"],
["nap", "create"],
["nap", "ui"],
["nap", "project", "bootstrap"],
):
try:
mod.main(argv)
except RuntimeError as exc:
assert "unknown" in str(exc)
else:
raise AssertionError(f"deprecated route must not be accepted: {argv}")
print("ok: nap installer gateway route smoke passed")