Skip to content

Fixes #39545 - add test:core_tests for plugins to use#11112

Open
evgeni wants to merge 1 commit into
theforeman:developfrom
evgeni:i39545
Open

Fixes #39545 - add test:core_tests for plugins to use#11112
evgeni wants to merge 1 commit into
theforeman:developfrom
evgeni:i39545

Conversation

@evgeni

@evgeni evgeni commented Jul 21, 2026

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.

Should we document this in the developer docs? https://github.com/theforeman/foreman/blob/develop/developer_docs/plugins.asciidoc is probably a good place. Also a chance to show an example for a plugin to override the pattern.

@evgeni

evgeni commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Also a chance to show an example for a plugin to override the pattern.

How would a plugin override the pattern?

@ekohl

ekohl commented Jul 21, 2026

Copy link
Copy Markdown
Member

Good question. I think a plugin can redefine the job, but it's not a very nice way.

@evgeni

evgeni commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

If two plugins are installed, which override wins? I'd rather not go that route.
In theforeman/actions#91 I only implemented "opt-out".
If the need to override arises, we can add it there.

@ekohl

ekohl commented Jul 21, 2026

Copy link
Copy Markdown
Member

If two plugins are installed, which override wins? I'd rather not go that route.

Agreed.

I think there is value in plugins being able to extend the list, but perhaps it's good enough to document it exists and that right now it can't be extended.


To ensure plugins don't break core functionaly, you can run `rake test:core_tests` which will execute a small set of tests from Foreman core.

This is executed automatically by the shared GitHub workflow in `@theforeman/actions`.

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.

Suggested change
This is executed automatically by the shared GitHub workflow in `@theforeman/actions`.
This is executed automatically by the shared GitHub workflow in [@theforeman/actions](https://github.com/theforeman/actions).


## Using tests from core

To ensure plugins don't break core functionaly, you can run `rake test:core_tests` which will execute a small set of tests from Foreman core.

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.

Suggested change
To ensure plugins don't break core functionaly, you can run `rake test:core_tests` which will execute a small set of tests from Foreman core.
To ensure plugins don't break core functionality, you can run `rake test:core_tests` which will execute a small set of tests from Foreman core.

You can use https://github.com/theforeman/foreman/blob/develop/developer_docs/slot-and-fill.asciidoc[Slot&Fill] to extend react components from core. No newline at end of file
You can use https://github.com/theforeman/foreman/blob/develop/developer_docs/slot-and-fill.asciidoc[Slot&Fill] to extend react components from core.

## Using tests from core

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.

Suggested change
## Using tests from core
## Testing for regressions in core

Comment thread lib/tasks/test.rake
end

desc "Core tests for plugins"
Rake::TestTask.new(:core_tests) do |t|

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.

Bikeshedding: should this be test:core?

Suggested change
Rake::TestTask.new(:core_tests) do |t|
Rake::TestTask.new(:core) do |t|

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You approved the actions PR with core_tests, so no? ;)

No, really, I don't care too much. Either works.

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.

I realized it too late. I don't feel too strongly about it though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@nadjaheitmann wanna play tiebreaker?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants