-
Notifications
You must be signed in to change notification settings - Fork 897
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 the dynamic service task naming generation for subclasses #18511
Conversation
cc245ab
to
077dea1
Compare
@miq-bot add_label hammer/yes |
expect(ServiceRetireTask.count).to eq(1) | ||
end | ||
expect(service_retire_task.description).to eq("Service Retire for: #{service.name} - ") | ||
expect(ServiceRetireTask.count).to eq(2) |
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.
Why 2?
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.
Because the top level service has one too.
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.
Oh, so one for the Service
and one for the ServiceOrchestration
?
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.
Yup!
for subclasses like ServiceOrchestration we need the base class name for Vms we just need the class name
077dea1
to
98950cc
Compare
Checked commit d-m-u@98950cc with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@tinaafitz please review, it's for that bug last week about retirement |
Fix the dynamic service task naming generation for subclasses (cherry picked from commit 7870b3f) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1685737
Hammer backport details:
|
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1684092
The service task magic generation should've used safe_constantize.
for subclasses like ServiceOrchestration we need the base class name; for Vms we just need the class name
This fixes the tests, too, cause they should've used
add_resource
.