Skip to content
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

Fix ruby_source_path in Ventura systemsettings-caveats fixture JSON #15197

Merged
merged 1 commit into from Apr 11, 2023

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Apr 10, 2023

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

  • Cask source paths were added to the API in 844db75. The main everything.json file was updated with the new data in that commit, but this one was missed causing local test failures.

Before:

Cask::Cask#to_h when loaded from cask file returns expected hash
  Failure/Error: expect(JSON.pretty_generate(hash)).to eq(expected_json_after_ventura)
    [...]

    Diff:
    @@ -93,7 +93,7 @@
        "en",
        "eo"
      ],
    -  "ruby_source_path": "Formula/everything.rb",
    +  "ruby_source_path": "Casks/everything.rb",
      "ruby_source_checksum": {
        "sha256": "b2707d1952f02c3fa566b7ad2a707a847a959d36f51d3dee642dbe5deec12f27"
      }

  # ./test/cask/cask_spec.rb:231:in `block (4 levels) in <top (required)>'
  # ./test/support/helper/spec/shared_context/homebrew_cask.rb:52:in `block (2 levels) in <top (required)>'

- Cask source paths were added to the API in 844db75. The main
  `everything.json` file was updated with the new data in that commit,
  but this one was missed causing local test failures.

Before:

```
Cask::Cask#to_h when loaded from cask file returns expected hash
  Failure/Error: expect(JSON.pretty_generate(hash)).to eq(expected_json_after_ventura)
    [...]

    Diff:
    @@ -93,7 +93,7 @@
        "en",
        "eo"
      ],
    -  "ruby_source_path": "Formula/everything.rb",
    +  "ruby_source_path": "Casks/everything.rb",
      "ruby_source_checksum": {
        "sha256": "b2707d1952f02c3fa566b7ad2a707a847a959d36f51d3dee642dbe5deec12f27"
      }

  # ./test/cask/cask_spec.rb:231:in `block (4 levels) in <top (required)>'
  # ./test/support/helper/spec/shared_context/homebrew_cask.rb:52:in `block (2 levels) in <top (required)>'
```
@reitermarkus
Copy link
Member

The test for this should also be changed to stub MacOS.version instead of depending on which system you run it on.

@MikeMcQuaid MikeMcQuaid merged commit d8a7f34 into Homebrew:master Apr 11, 2023
24 checks passed
@MikeMcQuaid
Copy link
Member

Thanks @issyl0!

@reitermarkus Agreed, could you grab that?

@issyl0 issyl0 deleted the fix-ventura-caveats-test-diff branch April 11, 2023 09:49
@github-actions github-actions bot added the outdated PR was locked due to age label May 12, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants