Fix shared env lock in detector tests#2
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to make the detector’s Rust tests use a consistent, shared environment-variable lock by replacing remaining env_lock() usages with crate::global_test_env_lock(), to avoid test flakiness from concurrent env mutation.
Changes:
- Replaced several remaining
env_lock().lock().unwrap()calls indetect.rstests withcrate::global_test_env_lock().lock().unwrap(). - Standardized the test locking approach across host-path resolution and install detection test cases.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mxcl
pushed a commit
that referenced
this pull request
May 23, 2026
The documented dnf install lines pin resolution to the gh-cli repo with --repo gh-cli. That repo only ships the gh package, so on a fresh Fedora install without git already present the install fails with "nothing provides git needed by gh-2.87.3-1.x86_64 from gh-cli" (cli#12808). Dropping --repo lets dnf pull git from the system repos while still installing gh from gh-cli. The maintainer suggested this in the issue thread after spotting that other projects (docker, vagrant) use addrepo without the restrictive --repo flag. Closes cli#12808 Signed-off-by: Charlie Tonneslan <cst0520@gmail.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.
Summary
env_lock()calls indetect.rswithcrate::global_test_env_lock()Verification
cargo test -q isotope::tests::isotopes_credential_helper_dispatch_accepts_aws_protocol --lib -- --exactfromautomic-vault/automic-vaultafter syncing isotope checkouts