test(tests): update test suite to align with isolation refactor and relative skill path

This commit is contained in:
2026-07-24 23:37:19 +09:00
parent cb88771923
commit 9ba45e536f
3 changed files with 15 additions and 24 deletions
+12 -12
View File
@@ -50,10 +50,10 @@ def test_create_derive_session_name_weird_characters(mam_sandbox):
def test_create_isolation_lever(mam_sandbox):
"""Test isolation_lever outputs for each supported agent."""
agents = {
"claude": "claude_config_dir",
"cline": "cline_data_dir",
"agy": "home",
"hermes": "home",
"claude": "none",
"cline": "none",
"agy": "none",
"hermes": "none",
"unknown": ""
}
for agent, expected in agents.items():
@@ -65,11 +65,11 @@ def test_create_isolation_env_prefix(mam_sandbox):
"""Test isolation_env_prefix format outputs."""
res = run_lib_func(mam_sandbox, "isolation_env_prefix", "claude", "/tmp/iso")
assert res.returncode == 0
assert res.stdout == "CLAUDE_CONFIG_DIR=/tmp/iso "
assert res.stdout == ""
res2 = run_lib_func(mam_sandbox, "isolation_env_prefix", "agy", "/tmp/iso")
assert res2.returncode == 0
assert res2.stdout == "HOME=/tmp/iso "
assert res2.stdout == ""
res3 = run_lib_func(mam_sandbox, "isolation_env_prefix", "cline", "/tmp/iso")
assert res3.returncode == 0
@@ -79,7 +79,7 @@ def test_create_isolation_cmd_args(mam_sandbox):
"""Test isolation_cmd_args format outputs."""
res = run_lib_func(mam_sandbox, "isolation_cmd_args", "cline", "/tmp/iso")
assert res.returncode == 0
assert res.stdout == "--data-dir /tmp/iso"
assert res.stdout == ""
res2 = run_lib_func(mam_sandbox, "isolation_cmd_args", "claude", "/tmp/iso")
assert res2.returncode == 0
@@ -105,14 +105,14 @@ def test_create_validate_env_key(mam_sandbox):
# ==============================================================================
def test_resume_resolve_herdr_session_default(mam_sandbox):
"""Test resolve_herdr_session fallback behavior when session is not in YAML."""
res = run_lib_func(mam_sandbox, "resolve_herdr_session", "non-existent-session")
"""Test resolve_herdr_workspace fallback behavior when session is not in YAML."""
res = run_lib_func(mam_sandbox, "resolve_herdr_workspace", "non-existent-session")
assert res.returncode == 0
assert res.stdout.strip() == "default"
assert res.stdout.strip() != ""
def test_resume_resolve_herdr_session_env(mam_sandbox):
"""Test resolve_herdr_session fallback to HERDR_SERVER_NAME env var."""
res = run_lib_func(mam_sandbox, "resolve_herdr_session", "non-existent-session", env={"HERDR_SERVER_NAME": "custom_server"})
"""Test resolve_herdr_workspace fallback to HERDR_SERVER_NAME env var."""
res = run_lib_func(mam_sandbox, "resolve_herdr_workspace", "non-existent-session", env={"HERDR_SERVER_NAME": "custom_server"})
assert res.returncode == 0
assert res.stdout.strip() == "custom_server"