Skip to content

Fix more test failures#23088

Merged
cho-m merged 3 commits into
mainfrom
test-fixes-2
Jul 14, 2026
Merged

Fix more test failures#23088
cho-m merged 3 commits into
mainfrom
test-fixes-2

Conversation

@cho-m

@cho-m cho-m commented Jul 13, 2026

Copy link
Copy Markdown
Member

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • AI was used to generate or assist with generating this PR.

More test failure fixes.

https://github.com/Homebrew/homebrew-core/actions/runs/29278992918/job/86917281683?pr=292807#step:3:231

  Error: Cask::Caskroom.casks does not list a cask twice when it is also installed under an old token
  
  Failure/Error: expect(described_class.casks.map(&:token)).to eq(["new-cask"])
  
    expected: ["new-cask"]
         got: ["new-cask", "old-cask"]

https://github.com/Homebrew/homebrew-core/actions/runs/29278992918/job/86917281683?pr=292807#step:3:100

  Error: MacOSVersion::kernel_major_version matches the major version returned by OS.kernel_version
  
  Failure/Error: expect(described_class.kernel_major_version(OS::Mac.version)).to eq OS.kernel_version.major
  
    expected: #<Version::NumericToken 21>
         got: #<Version 20>

Copilot AI review requested due to automatic review settings July 13, 2026 21:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adjusts Homebrew’s RSpec suite to address two observed CI failures by making the affected specs more deterministic in environments with global macOS simulation settings and parallel trust-store interactions.

Changes:

  • Unset HOMEBREW_FAKE_MACOS in the MacOSVersion.kernel_major_version spec to ensure it matches the real OS.kernel_version on macOS runners.
  • Run the caskroom “old token” de-duplication spec under the :trust_store shared context to isolate the trust store per example.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Library/Homebrew/test/macos_version_spec.rb Ensures the kernel-major-version assertion isn’t affected by globally-set HOMEBREW_FAKE_MACOS.
Library/Homebrew/test/cask/caskroom_spec.rb Runs the cask rename/de-duplication spec with isolated trust-store state to avoid cross-test interference.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comment thread Library/Homebrew/test/macos_version_spec.rb
@cho-m cho-m added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 199d35f Jul 14, 2026
42 checks passed
@cho-m cho-m deleted the test-fixes-2 branch July 14, 2026 02:32
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.

3 participants