Skip to content

Fixes #39210 - Fix the tests#441

Merged
ofedoren merged 1 commit intotheforeman:masterfrom
adamruzicka:fix-test
Apr 7, 2026
Merged

Fixes #39210 - Fix the tests#441
ofedoren merged 1 commit intotheforeman:masterfrom
adamruzicka:fix-test

Conversation

@adamruzicka
Copy link
Copy Markdown
Contributor

This most likely broke when theforeman/foreman#10701 went in.

result += untaxed_environments
end
result
ForemanPuppet::Environment.authorized(:view_environments).pluck(:name)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This currently requires theforeman/foreman#10898 . An alternative would be this suggestion

Suggested change
ForemanPuppet::Environment.authorized(:view_environments).pluck(:name)
ForemanPuppet::Environment.authorized(:view_environments).distinct.pluck(:name)

Copy link
Copy Markdown
Member

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

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

This should also bump required foreman version if we merge the change in core :/

@ofedoren
Copy link
Copy Markdown
Member

ofedoren commented Apr 2, 2026

I hope the tests will fail :) As expected, currently the tests fail.

And maybe it's worth to create a RM issue to link to the core's one? And if the tests fail, I guess it won't hurt to add a commit to run this CI with theforeman/foreman#10898 to ensure the tests pass with that change.

Although this is pretty straightforward issue/change (thus not required), I'd like to make a pattern from testing with the dependency.

@adamruzicka
Copy link
Copy Markdown
Contributor Author

And if the tests fail, I guess it won't hurt to add a commit to run this CI

Yeah, I have it ready, I was just waiting for the tests to fail.

@adamruzicka adamruzicka marked this pull request as ready for review April 2, 2026 16:40
@ofedoren ofedoren changed the title Fix the tests Fixes #39210 - Fix the tests Apr 7, 2026
Copy link
Copy Markdown
Member

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

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

Thanks, @adamruzicka !

@ofedoren ofedoren merged commit de03f41 into theforeman:master Apr 7, 2026
12 checks passed
@@ -1,5 +1,5 @@
Foreman::Plugin.register :foreman_puppet do
requires_foreman '>= 3.13'
requires_foreman '>= 3.19'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for fixing! Let's keep in mind to do a major version bump during the next release.

@adamruzicka adamruzicka deleted the fix-test branch April 8, 2026 13:50
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