-
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 call for future retirement #17382
Conversation
@tinaafitz |
0cef6f4
to
2af71be
Compare
2af71be
to
f2bb584
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.
@d-m-u Looks good.
@tinaafitz can we do something with this PR? |
@mkanoor Please review. |
before do | ||
@miq_server = EvmSpecHelper.local_miq_server | ||
@stack = FactoryGirl.create(:orchestration_stack) | ||
end | ||
|
||
it "#retirement_check" do | ||
User.current_user = user |
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.
@d-m-u
Instead of using User.current_user you have to do something in a block
https://github.com/ManageIQ/manageiq/blob/master/spec/lib/rbac/filterer_spec.rb#L263
f2bb584
to
6ac192c
Compare
@mkanoor Please review. |
@@ -7,10 +7,10 @@ | |||
|
|||
# shouldn't be running make_retire_request because it's the bimodal not from ui part | |||
it "#retirement_check" do | |||
User.current_user = user |
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.
@d-m-u
Can we use User.with_user with a do block similar to this
manageiq/spec/lib/rbac/filterer_spec.rb
Line 263 in a9ea250
User.with_user(admin_user) do |
@@ -10,10 +10,10 @@ | |||
end | |||
|
|||
it "#retirement_check" do | |||
User.current_user = user |
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.
@d-m-u
can we user User.with_user here similar to
manageiq/spec/lib/rbac/filterer_spec.rb
Line 263 in a9ea250
User.with_user(admin_user) do |
6ac192c
to
74e62e9
Compare
Checked commit d-m-u@74e62e9 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 app/models/mixins/retirement_mixin.rb
|
The make_retire_request changes necessitate this call change for future retirement. Note that the retirement as done through the UI, when set to retire on future date/time, will only work after https://bugzilla.redhat.com/show_bug.cgi?id=1574628 gets resolved, so while this PR fixes the call, future retirement through UI is still a bit kaput for the time being.