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

Simplify tests. #16632

Merged
merged 6 commits into from Feb 10, 2024
Merged

Simplify tests. #16632

merged 6 commits into from Feb 10, 2024

Conversation

reitermarkus
Copy link
Member

@reitermarkus reitermarkus commented Feb 9, 2024

  • 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?

Extracted from #16629 to see if any of these changes cause the flaky tests.

@reitermarkus reitermarkus requested a review from a team February 10, 2024 11:39
Copy link
Contributor

@apainintheneck apainintheneck left a comment

Choose a reason for hiding this comment

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

Looks good to me. At a glance, it doesn't seem to increase test time noticeably and it makes the tests easier to follow. It also better insulates tests from each other by clearing the tap caches.

Comment on lines +46 to +48
# These are only used manually in tests since they
# would otherwise conflict with other casks.
next if relative_cask_path.dirname.basename.to_s == "outdated"
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we could just include this in the glob pattern itself. Doesn't need to be changed though. This is fine.

@apainintheneck apainintheneck merged commit 6797edf into Homebrew:master Feb 10, 2024
24 checks passed
@p-linnane
Copy link
Member

This may be causing some brew style errors. It appears it's not respecting the sharding we did of the cask repo:
https://github.com/Homebrew/homebrew-core/actions/runs/7861902512/job/21452740091?pr=162322#step:3:35

@apainintheneck
Copy link
Contributor

Interesting... I wouldn't expect this to affect the linter at all since the only things that have changed here are tests and fixtures. I'll look into it some more but also we could just revert this since it's just a refactor.

@p-linnane
Copy link
Member

This is very much a best guess on my end for which recent PR changed this behavior. I don't think it's affecting enough stuff to revert, since that one instance is all I've seen having issues. If we can fix forward that'd be even better!

@apainintheneck
Copy link
Contributor

It seems that there exists a handbrake cask as well and that's getting linted here for no reason. It'd probably be good to fix the test bot so that it only runs then audit on formulae here as well. But that doesn't really solve the root of the problem, just the symptom.

@reitermarkus reitermarkus deleted the simplify-tests branch February 16, 2024 07:35
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 18, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
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