-
Notifications
You must be signed in to change notification settings - Fork 357
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
Fix ordering an Ansible Playbook catalog items #2991
Fix ordering an Ansible Playbook catalog items #2991
Conversation
@miq-bot add_label bug, gaprindashvili/yes, blocker |
@eclarizio , @dclarizio - please review |
d4391e5
to
d84d09b
Compare
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 code seems like it should work but the spec is passing with the incorrect target_type
.
target_ansible = instance_double("ServiceTemplateAnsiblePlaybook", :class => ServiceTemplateAnsiblePlaybook, :id => 987, :service_template_catalog_id => 798) | ||
expect(service.determine_dialog_locals_for_svc_catalog_provision(resource_action, target_ansible, finish_submit_endpoint)).to eq(:resource_action_id => 456, | ||
:target_id => 987, | ||
:target_type => 'service_template_ansible_playbook', |
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.
Shouldn't the target type end up being just service_template
and not service_template_ansible_playbook
? Otherwise this doesn't fix the issue, because the API doesn't know what a service_template_ansible_playbook
collection is.
Also it seems weird to me that rubocop didn't flag the line length issue, but you could put the hash on a new line so it looks something like:
expect(method_call).to eq(
:resource_action_id => "123",
:target_id => "321",
# etc
)
d84d09b
to
b63a6ce
Compare
@eclarizio - fixed the spec - the instance_double requires the kind_of to be specifically allowed to return the real base class - please re-review |
b63a6ce
to
0be177f
Compare
0be177f
to
da71436
Compare
Checked commits lgalis/manageiq-ui-classic@c1de2a0~...da71436 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
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.
👍
…for_srvc_dialog_api Fix ordering an Ansible Playbook catalog items (cherry picked from commit 37e15d2) https://bugzilla.redhat.com/show_bug.cgi?id=1525077
Gaprindashvili backport details:
|
Use service template in api_submit_endpoint for service template subclasses, as there are no collections for subclasses
Links
https://bugzilla.redhat.com/show_bug.cgi?id=1523580
Before:
After