Purge legacy CLI command aliases
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ def assert_raises_hashicorp_closed(fn):
|
||||
message = str(exc)
|
||||
assert "HashiCorp" in message
|
||||
assert "disabled" in message
|
||||
assert "setup-request" in message
|
||||
assert "nap gateway vault process" in message
|
||||
else:
|
||||
raise AssertionError("CLI direct project encryption enable must fail closed")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user