Forward xiaohe upgrade --beta so the wrapper matches the agent CLI.

This commit is contained in:
Zhengshou Lai
2026-08-14 16:26:39 +08:00
parent c2d8e1c014
commit d6a0f455b0
2 changed files with 17 additions and 0 deletions
+9
View File
@@ -19,6 +19,15 @@ class TestUpgradeCommand:
["/bin/xiaohe", "upgrade", "0.5.1", "--force"]
)
def test_forwards_beta(self) -> None:
with (
patch.object(up_mod.shutil, "which", return_value="/bin/xiaohe"),
patch.object(up_mod.subprocess, "call", return_value=0) as call,
):
result = CliRunner().invoke(up_mod.upgrade_cmd, ["--beta"])
assert result.exit_code == 0
call.assert_called_once_with(["/bin/xiaohe", "upgrade", "--beta"])
def test_missing_xiaohe(self) -> None:
with patch.object(up_mod.shutil, "which", return_value=None):
result = CliRunner().invoke(up_mod.upgrade_cmd, [])