test(handlers): add unit tests for tarWalk in plugins_atomic_tar.go #445

Merged
core-lead merged 1 commits from fix/test-plugins-atomic-tar-coverage into staging 2026-05-11 09:52:47 +00:00

1 Commits

Author SHA1 Message Date
01c6977a5c test(handlers): add unit tests for tarWalk in plugins_atomic_tar.go
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 11s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 16s
audit-force-merge / audit (pull_request) Successful in 16s
Covers tarWalk — the only non-trivial function in the file. Tests
use real temp directories so no mocking overhead:

- Empty directory emits one directory header
- Single file emits dir + file with correct content + size
- Nested directories preserve full path under prefix
- Symlinks are skipped (not emitted in archive)
- Prefix trailing slash is normalized (no double-slash bug)
- Prefix "." emits flat paths without "./" prefix
- Nonexistent directory propagates walk error

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 09:23:38 +00:00