-
Notifications
You must be signed in to change notification settings - Fork 286
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
Fixes #24549 - Add rendering extension tests #7602
Conversation
Issues: #24549 |
lib/katello/engine.rb
Outdated
if Katello.with_remote_execution? | ||
::ForemanRemoteExecution::Renderer::Scope::Input.send :include, Katello::Concerns::InputTemplateScopeExtensions | ||
end | ||
::Foreman::Renderer::Scope::Base.send :include, Katello::Concerns::InputTemplateScopeExtensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be available for provisoning templates and partitions tables as well?
If so, please also rename the concern to BaseTemplateScopr extensions.
Better would be to explicity include this for all the template types that need the errata macro. Bear in mind that we also habe report templates now that are not associated to a host.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal was to expand it to work with all templates yes, (it was largely to make it easier to test, and there's not necessarily a reason to restrict it to just REX templates).
Will rename it.
end | ||
|
||
def test_errata | ||
source = Foreman::Renderer::Source::String.new( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are tests failing due to a missing include for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, lets try this :)
13a5107
to
3b04b04
Compare
and fix a few issues with those extensions. The errata id helper did not take permissions into account, the kickstart_attributes method was not using the new medium provider and thus would not work. This also moves the errata helper to the base input scope instead of on a REX class for easier testing.
and fix a few issues with those extensions. The
errata id helper did not take permissions into account,
the kickstart_attributes method was not using the new
medium provider and thus would not work. This also
moves the errata helper to the base input scope instead
of on a REX class for easier testing.