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

raise_retirement_event called with user object should expect the user info #18471

Merged

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Feb 20, 2019

Fixes specs broken by merge of #18462

When raise_retirement_event is called with a string the user information shouldn't be present. It should only be present when we call it with a user object...

@d-m-u
Copy link
Contributor Author

d-m-u commented Feb 20, 2019

@miq-bot add_label heck i don't know, specs? is that a thing?
@miq-bot add_label tests

@miq-bot
Copy link
Member

miq-bot commented Feb 20, 2019

@d-m-u Cannot apply the following labels because they are not recognized: heck i don't know, specs? is that a thing?

@miq-bot
Copy link
Member

miq-bot commented Feb 20, 2019

@d-m-u Cannot apply the following label because they are not recognized: tests

@d-m-u
Copy link
Contributor Author

d-m-u commented Feb 20, 2019

@miq-bot add_label test

@miq-bot miq-bot added the test label Feb 20, 2019
@d-m-u d-m-u force-pushed the fixing_red_master_service_retirement_specs branch from 888be6b to 6f68836 Compare February 20, 2019 18:41
@Fryguy
Copy link
Member

Fryguy commented Feb 20, 2019

The code here: https://github.com/ManageIQ/manageiq/pull/18462/files#diff-5c80c9a5ecc28374ffccc13421a61b65R270 seems to imply to me that if given a user object we should try to find the user. I feel like there should be two specs... 1) with a String of a user that doesn't exist 2) with a String of a user that does exist (this mirrors the 2 specs for when a user object is passed as well)

@d-m-u
Copy link
Contributor Author

d-m-u commented Feb 20, 2019

Um, there is.

it "with user that isn't found" do
covers the case with the user that doesn't exist.

@Fryguy
Copy link
Member

Fryguy commented Feb 20, 2019

I see

  describe "#raise_retirement_event " do
    it "without user" do
    it "with string user" do
    it "with user object" do
    it "with user that isn't found" do

I think it needs it "with string user that isn't found" do

@d-m-u d-m-u force-pushed the fixing_red_master_service_retirement_specs branch 2 times, most recently from 4fc14b3 to 768a7e9 Compare February 20, 2019 19:06
also don't 🔪 me, bdunne for the admin user create please, if we just seeded specs this ridiculousness would be less of a thing
@d-m-u d-m-u force-pushed the fixing_red_master_service_retirement_specs branch from 768a7e9 to 209ba99 Compare February 20, 2019 19:36
@miq-bot
Copy link
Member

miq-bot commented Feb 20, 2019

Checked commit d-m-u@209ba99 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🍪

Copy link
Member

@Fryguy Fryguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, it doesn't make sent to have a find a user if given a user object :)

@Fryguy Fryguy merged commit 2665784 into ManageIQ:master Feb 20, 2019
@Fryguy Fryguy added the bug label Feb 20, 2019
@Fryguy Fryguy added this to the Sprint 106 Ending Mar 4, 2019 milestone Feb 20, 2019
@Fryguy Fryguy self-assigned this Feb 20, 2019
@d-m-u d-m-u deleted the fixing_red_master_service_retirement_specs branch September 26, 2019 10:34
simaishi pushed a commit that referenced this pull request Oct 21, 2019
…ment_specs

raise_retirement_event called with user object should expect the user info

(cherry picked from commit 2665784)
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit a0099ccf5bfbeea75a7cd46c0b240ae8b2311ab5
Author: Jason Frey <[email protected]>
Date:   Wed Feb 20 14:57:43 2019 -0500

    Merge pull request #18471 from d-m-u/fixing_red_master_service_retirement_specs
    
    raise_retirement_event called with user object should expect the user info
    
    (cherry picked from commit 26657842e27339f1218f07aa0e4bd676c4c74d28)

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