Skip to content
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

Merged
merged 1 commit into from
Aug 9, 2018

Conversation

jlsherrill
Copy link
Member

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.

@theforeman-bot
Copy link

Issues: #24549

if Katello.with_remote_execution?
::ForemanRemoteExecution::Renderer::Scope::Input.send :include, Katello::Concerns::InputTemplateScopeExtensions
end
::Foreman::Renderer::Scope::Base.send :include, Katello::Concerns::InputTemplateScopeExtensions
Copy link
Contributor

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.

Copy link
Member Author

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(
Copy link
Contributor

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?

Copy link
Member Author

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 :)

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.
@jlsherrill jlsherrill merged commit 2d8841e into Katello:master Aug 9, 2018
@jlsherrill jlsherrill deleted the 24549 branch August 9, 2018 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants