Add test suite for install and uninstall scripts - #1
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Add test suite for install and uninstall scripts#1devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
The install and uninstall scripts had no automated coverage, so regressions in the Stow wiring or the legacy-symlink cleanup would go unnoticed until they broke a real setup. - Add a bats suite exercising both scripts in a sandbox HOME, covering symlink creation, metadata exclusion, CLAUDE.md linking, idempotency, legacy-link removal, and the missing-Stow error path - Add tests/run.sh as a dependency-checking entry point
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
install.shanduninstall.share the only executable code in this repo and had zero automated coverage — the rest is Markdown skill definitions. This adds a bats suite (16 tests) for both scripts, the modules with the least coverage.Each test runs the real script against a throwaway sandbox via env overrides (
HOME,CLAUDE_HOME,CLAUDE_SKILLS_DIR,CODEX_HOME,CODEX_SKILLS_DIR), so the suite never touches the developer's real Claude/Codex config.Coverage:
README.md,AGENTS.md,install.sh,uninstall.sh) excluded;AGENTS.mdlinked as~/.claude/CLAUDE.md.remove_link_if_targetlogic — legacy renamed-skill links (e.g.write-a-prd,caveman) that resolve into the repo are removed, while same-named links pointing elsewhere are left untouched (this is the trickiest branch — it resolves relative symlink targets before comparing).1with the "GNU Stow is required" message whenstowis absent, exercised via a PATH stripped ofstowbut retaining the other coreutils the scripts need.CLAUDE.md, and empty skills dirs, but leaves a foreignCLAUDE.mdalone.Run with:
./tests/run.sh # checks for bats + stow, then runs bats tests/tests/helper.bashholds the shared sandbox setup and anassert_symlink_tohelper. All 16 tests pass andshellcheckis clean on the scripts and helpers.Link to Devin session: https://app.devin.ai/sessions/7ec072a7005b41d8844b1a41acf1ebf1
Requested by: @sidwood