test(handlers/workspace_crud): add workspace_crud_helpers_test.go — 7 cases for validateWorkspaceDir #716

Merged
hongming merged 2 commits from test/workspace-crud-helpers-coverage into staging 2026-05-12 21:07:28 +00:00

2 Commits

Author SHA1 Message Date
e3c662cecf ci: rerun after mc#724 all-required fix lands
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 20s
sop-tier-check / tier-check (pull_request) Successful in 19s
audit-force-merge / audit (pull_request) Successful in 30s
2026-05-12 20:51:55 +00:00
613d32703c test(handlers/workspace_crud): add workspace_crud_helpers_test.go — 7 cases for validateWorkspaceDir
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 14s
sop-tier-check / tier-check (pull_request) Successful in 14s
Covers:
- AcceptsValidAbsolutePath: 8 valid workspace_dir values
- RejectsRelativePath: 5 cases (relative, ./local, ../sibling, bare, empty)
- RejectsTraversalSequence: 5 cases with ".." sequences
- RejectsSystemPaths: 9 blocked root paths
- RejectsDescendantsOfSystemPaths: 10 blocked descendants
- AcceptsPathsSimilarToSystemPaths: paths that LOOK like system paths but
  are distinct (e.g. /etx, /vartmp, /workspace/etc)
- ErrorMessages: non-empty error strings
2026-05-12 10:16:26 +00:00