mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-29 06:31:32 +00:00
test(skills): widen assertion in PR#6656 regression to accept new validator msg
The new install-path validator from this PR raises 'Unsafe install path: ...' earlier in the pipeline than the previous resolve-then-check path. Behavior is identical (ok=False, victim untouched, refused before rmtree) — only the error string changed.
This commit is contained in:
parent
3b9b9a7ad7
commit
0a6a0ba527
1 changed files with 6 additions and 1 deletions
|
|
@ -99,7 +99,12 @@ class TestUninstallPathTraversal:
|
|||
ok, msg = uninstall_skill("evil")
|
||||
|
||||
assert ok is False
|
||||
assert "outside" in msg or "resolves" in msg or "skills directory" in msg
|
||||
assert (
|
||||
"outside" in msg
|
||||
or "resolves" in msg
|
||||
or "skills directory" in msg
|
||||
or "Unsafe install path" in msg
|
||||
)
|
||||
# The victim directory MUST still exist.
|
||||
assert victim.exists()
|
||||
assert (victim / "important.txt").exists()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue