Skip to content

Clear environment in settings tests #9914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2024
Merged

Clear environment in settings tests #9914

merged 1 commit into from
Dec 15, 2024

Conversation

charliermarsh
Copy link
Member

Summary

Part of: #9873

@charliermarsh charliermarsh requested a review from zanieb December 15, 2024 14:40
@charliermarsh charliermarsh added the testing Internal testing of behavior label Dec 15, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) December 15, 2024 18:28
@charliermarsh charliermarsh merged commit 9ab7dd6 into main Dec 15, 2024
64 checks passed
@charliermarsh charliermarsh deleted the charlie/clear branch December 15, 2024 18:40
charliermarsh added a commit that referenced this pull request Dec 18, 2024
<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

Override XDG_CONFIG_DIRS in show_settings tests, in order to ensure that
they don't pick system configuration, and therefore fail due to value
mismatches. This specifically addresses test failures on Gentoo where a
default `/etc/xdg/uv/uv.toml` is installed, and users are free to modify
it.

Prior to #9914, we used to set `XDG_CONFIG_DIRS` locally before running
the test suite. However, since the test now wipes the environment, the
problem can no longer be resolved downstream.

## Test Plan

`cargo test` on a Gentoo system (with `/etc/xdg/uv/uv.toml` present).

---------

Co-authored-by: Charlie Marsh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Internal testing of behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants