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

Fix call for future retirement #17382

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented May 3, 2018

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.

@d-m-u
Copy link
Contributor Author

d-m-u commented May 3, 2018

@tinaafitz
@miq_bot add_label bug

@d-m-u d-m-u force-pushed the fixing_retire_later_call branch from 0cef6f4 to 2af71be Compare May 7, 2018 11:54
@d-m-u d-m-u force-pushed the fixing_retire_later_call branch from 2af71be to f2bb584 Compare May 17, 2018 13:12
@d-m-u
Copy link
Contributor Author

d-m-u commented May 17, 2018

@tinaafitz

Copy link
Member

@tinaafitz tinaafitz left a 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.

@d-m-u
Copy link
Contributor Author

d-m-u commented May 24, 2018

@tinaafitz can we do something with this PR?

@tinaafitz
Copy link
Member

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

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

@d-m-u d-m-u force-pushed the fixing_retire_later_call branch from f2bb584 to 6ac192c Compare May 29, 2018 20:34
@tinaafitz
Copy link
Member

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

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

User.with_user(admin_user) do

@@ -10,10 +10,10 @@
end

it "#retirement_check" do
User.current_user = user
Copy link
Contributor

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

User.with_user(admin_user) do

@d-m-u d-m-u force-pushed the fixing_retire_later_call branch from 6ac192c to 74e62e9 Compare June 4, 2018 19:56
@miq-bot
Copy link
Member

miq-bot commented Jun 4, 2018

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
4 files checked, 1 offense detected

app/models/mixins/retirement_mixin.rb

@mkanoor mkanoor merged commit dfa55f3 into ManageIQ:master Jun 5, 2018
@mkanoor mkanoor added this to the Sprint 88 Ending Jun 18, 2018 milestone Jun 5, 2018
@d-m-u d-m-u deleted the fixing_retire_later_call branch October 26, 2018 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants