feat: complete professional cli with full lifecycle and tests

This commit is contained in:
Fredrick Amnehagen 2026-02-05 11:37:29 +01:00
parent a7d97227d3
commit 34ba255024
12 changed files with 112 additions and 9 deletions

View file

@ -43,3 +43,22 @@ def test_ingress_cli(unique_id):
# Remove
res = run_infra(["ingress", "remove", domain])
assert res.returncode == 0
def test_router_cli(unique_id):
name = f"Test-Cli-{unique_id}"
section = name.lower().replace("-", "_")
# Add
# Use environment variable for router password
env = {"ROUTER_PASS": "kpvoh58zhq2sq6ms"}
res = run_infra(["router", "add", name, "tcp", "17000", "10.32.70.212", "17000"], env=env)
assert res.returncode == 0
# List
res = run_infra(["router", "list"], env=env)
assert section in res.stdout
# Remove
res = run_infra(["router", "remove", section], env=env)
assert res.returncode == 0