Repository navigation
test: keep the sync tests out of the real data dir - #116
Merged
Merged
Conversation
sync_delivery_test, sync_drift_test, sync_hint_test, sync_readvertise_test and sync_selftest imported clippy with the user's XDG dirs. A received file was moved into the real ~/.local/share/clippy/received/ (1.7.1 leaves an empty received/<hash>/ folder behind each run) and the tests read the real settings. Each now points XDG_DATA_HOME, XDG_CONFIG_HOME and XDG_RUNTIME_DIR at a throwaway dir before importing clippy, as multi_file_groups_test does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Five sync tests imported `clippy` with the user's real XDG dirs. Running them on a dev machine wrote into the real `~/.local/share/clippy/received/`: since 1.7.1, every run leaves an empty `received//` folder there. They also read the real `settings.json`, so a result could depend on local settings.
What
`sync_delivery_test`, `sync_drift_test`, `sync_hint_test`, `sync_readvertise_test` and `sync_selftest` now point `XDG_DATA_HOME`, `XDG_CONFIG_HOME` and `XDG_RUNTIME_DIR` at a throwaway dir before importing `clippy`, as `multi_file_groups_test` already does. Test code only; no app change and no version bump.
Tested (on the Mac)
🤖 Generated with Claude Code