Skip to content

Fix shared env lock in detector tests#2

Merged
mxcl merged 1 commit into
trunkfrom
codex/av-gh-cli-env-lock-2026-05-23
May 23, 2026
Merged

Fix shared env lock in detector tests#2
mxcl merged 1 commit into
trunkfrom
codex/av-gh-cli-env-lock-2026-05-23

Conversation

@mxcl
Copy link
Copy Markdown
Member

@mxcl mxcl commented May 23, 2026

Summary

  • replace the remaining env_lock() calls in detect.rs with crate::global_test_env_lock()
  • keep the detector test locking strategy consistent across all cases

Verification

  • cargo test -q isotope::tests::isotopes_credential_helper_dispatch_accepts_aws_protocol --lib -- --exact from automic-vault/automic-vault after syncing isotope checkouts

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in detect.rs tests with crate::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.

Comment thread detect.rs
@mxcl mxcl merged commit f82e76c into trunk May 23, 2026
1 check passed
@mxcl mxcl deleted the codex/av-gh-cli-env-lock-2026-05-23 branch May 23, 2026 14:10
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants