test(tests): update test suite to align with isolation refactor and relative skill path
This commit is contained in:
@@ -97,23 +97,14 @@ d['herdr_sessions'] = [
|
||||
assert "Duplicate running conversation ID" in res.stderr
|
||||
|
||||
def test_comp_create_isolation_folder_setup(mam_sandbox):
|
||||
"""Verify that provision_isolation correctly creates directories and symlinks."""
|
||||
"""Verify that provision_isolation runs cleanly as a stub for global config isolation."""
|
||||
lib_path = mam_sandbox / ".agents" / "skills" / "lib.sh"
|
||||
iso_root = mam_sandbox / "iso_home_test"
|
||||
|
||||
# Mock global claude credentials
|
||||
claude_cred = mam_sandbox / ".claude"
|
||||
claude_cred.mkdir(parents=True, exist_ok=True)
|
||||
(claude_cred / ".credentials.json").write_text('{"token": "xyz"}')
|
||||
|
||||
cmd_str = f"source {lib_path} && provision_isolation claude {iso_root}"
|
||||
res = subprocess.run(["bash", "-c", cmd_str], capture_output=True, text=True)
|
||||
assert res.returncode == 0
|
||||
|
||||
# Verify symlink exists and points to the credentials
|
||||
cred_sym = iso_root / ".credentials.json"
|
||||
assert cred_sym.is_symlink()
|
||||
assert cred_sym.read_text() == '{"token": "xyz"}'
|
||||
assert res.stdout == ""
|
||||
|
||||
def test_comp_create_sqlite_tables_created(mam_sandbox, mock_herdr, mock_agents):
|
||||
"""Verify that tables exist and contain records after a full create_session.sh run."""
|
||||
|
||||
Reference in New Issue
Block a user