Fixes #39545 - add test:core_tests for plugins to use#11112
Conversation
ekohl
left a comment
There was a problem hiding this comment.
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.
How would a plugin override the pattern? |
|
Good question. I think a plugin can redefine the job, but it's not a very nice way. |
|
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`. |
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
| 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 |
There was a problem hiding this comment.
| ## Using tests from core | |
| ## Testing for regressions in core |
| end | ||
|
|
||
| desc "Core tests for plugins" | ||
| Rake::TestTask.new(:core_tests) do |t| |
There was a problem hiding this comment.
Bikeshedding: should this be test:core?
| Rake::TestTask.new(:core_tests) do |t| | |
| Rake::TestTask.new(:core) do |t| |
There was a problem hiding this comment.
You approved the actions PR with core_tests, so no? ;)
No, really, I don't care too much. Either works.
There was a problem hiding this comment.
I realized it too late. I don't feel too strongly about it though.
No description provided.