AGENT SKILL
setup-hook-tests
Add or extend Bats coverage for setup-hook scripts.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-16
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- setup-hook-tests
- metadata
- { "source-of-truth": [ "tests/unit/", "system_files/" ] }
- description
- Add or extend Bats coverage for setup-hook scripts.
03 SKILL.md 正文
Setup-hook tests
Procedure
- Append to the existing test file for the hook.
- Create a unique sandbox under
tests/unit/.bats-sandbox/. - Patch absolute system paths before running the hook.
- Stub commands through a test-local
stub-bindirectory. - Assert the concrete side effect, not only exit status.
Run:
bats tests/unit/
pre-commit run --all-files
Red flags
- The test writes outside its sandbox.
- A real
/usrhelper or absolute binary is still called. - A test asserts only that the script exits zero.
- A second test file is created for an existing hook.
When to Use
Use for Bats coverage for setup hooks.
When NOT to Use
Do not use for Non-hook build scripts or full image validation.
Core Process
Sandbox the hook, patch absolute paths, assert concrete side effects.
Common Rationalizations
- "A shortcut is harmless." Follow the source-of-truth and verification rules instead.
Red Flags
- Testing against the host filesystem or asserting only exit zero.
Verification
- [ ] The selected source and focused command were checked.
- [ ] The repository default gate passes.
04 同仓库更多 Skills
variants
Determine the correct image, stream, flavor, branch, and workflow target.
★ 0
skill-improvement
Add, refactor, validate, and maintain agent skills without duplicating facts.
★ 0
security
Review image supply-chain, signing, COPR, and secure-boot changes.
★ 0
release-artifacts
Prepare, verify, or troubleshoot image release and promotion artifacts.
★ 0
packages
Add, remove, or classify RPM, Flatpak, COPR, and Homebrew inputs.
★ 0
issue-lifecycle
Understand and operate the repository issue lifecycle and work queue.
★ 0