Skip to content

always execute access_permissions_test from Foreman core#16

Closed
evgeni wants to merge 1 commit into
v0from
access_permissions_test
Closed

always execute access_permissions_test from Foreman core#16
evgeni wants to merge 1 commit into
v0from
access_permissions_test

Conversation

@evgeni

@evgeni evgeni commented Oct 25, 2023

Copy link
Copy Markdown
Member

No description provided.

@ekohl ekohl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@evgeni

evgeni commented Oct 25, 2023

Copy link
Copy Markdown
Member Author

So, we could have a test:things_plugins_need_to_test_from_core_and_naming_is_hard that lists access_permissions and test:$plugin depends on that (essentially, what openscap is doing plus an dependency)?

the other linked things are good own tests (as in: they are testing that the routes done by the plugin are sane), but I think executing the core version of the test also ensure we don't break stuff from core?

@ekohl

ekohl commented Oct 30, 2023

Copy link
Copy Markdown
Member

So I found how I tried to solve it in the past: theforeman/foreman-tasks@3ad347b can be summed up as theforeman/foreman_plugin_template#51

@kamils-iRonin

kamils-iRonin commented Feb 2, 2024

Copy link
Copy Markdown
Member

I like the idea of having a static list of recommended core tests in the core. I would also run all core tests on merge to master – to make sure that a plugin does not affect the core. Of course, making these core tests optional would still give us some flexibility.

@evgeni

evgeni commented Nov 11, 2024

Copy link
Copy Markdown
Member Author

I am going to call theforeman/foreman_plugin_template#51 the correct implementation for now, closing.

@evgeni evgeni closed this Nov 11, 2024
@nadjaheitmann

nadjaheitmann commented Jun 10, 2026

Copy link
Copy Markdown

Actually, I would prefer to re-open this PR compared to the one in the plugin template. I think that all plugins should run this test, it is important. So why not just unify it here?

@evgeni @ekohl @kamils-iRonin Any opinions?

I don't see the permissions test executed very often in CI. Not sure what is the reason. It probably got lost somehow as the CIs switched to using this action.

@evgeni

evgeni commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

I still like @ekohl's statement:

I'm still leaning to making sure rake test:$plugin does the right thing, because that's what developers should also run locally.

Granted, as nobody extends test:$plugin today, it's also not true (as you have rightfully pointed out).

Let's see what #91 says while I think of how this can be done smarter.

@nadjaheitmann

Copy link
Copy Markdown

Granted, as nobody extends test:$plugin today, it's also not true (as you have rightfully pointed out).

Unfortunately.

Developers can also run the permissions test locally from Foreman directory, but they don't do that either. I see myself relying a lot on upstream CI as well.

@nadjaheitmann

Copy link
Copy Markdown

Somehow related topic: I also see many plugins referencing v0 instead of v1. I assume some updates are required there as well?

@evgeni

evgeni commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

Somehow related topic: I also see many plugins referencing v0 instead of v1. I assume some updates are required there as well?

Don't these plugins utilize dependabot to update their GHA actions? ;)

@nadjaheitmann

Copy link
Copy Markdown

Somehow related topic: I also see many plugins referencing v0 instead of v1. I assume some updates are required there as well?

Don't these plugins utilize dependabot to update their GHA actions? ;)

DependaWho? ;)

https://github.com/theforeman/foreman_ansible/blob/master/.github/workflows/ruby_tests.yml#L25

I admit that this is not updated in various plugins that I am maintaining, either 🙈

@evgeni

evgeni commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

markt-de/foreman_ovirt@9e552af

Which then does things like markt-de/foreman_ovirt#18

@nadjaheitmann

Copy link
Copy Markdown

markt-de/foreman_ovirt@9e552af

Which then does things like markt-de/foreman_ovirt#18

I guess I'll open some PRs eventually, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

4 participants