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 ipmi pool api #554

Merged
merged 2 commits into from
Jun 8, 2017
Merged

Fix ipmi pool api #554

merged 2 commits into from
Jun 8, 2017

Conversation

michaeljs1990
Copy link
Contributor

@michaeljs1990 michaeljs1990 commented Jun 2, 2017

I messed this up somehow even though I checked it a ton of times. Not sure
how i missed this but I have since learned pattern matching in scala sets
is not that simple. This correctly matches against Sets and non Sets. I
updated the test to check for the case of two pools being returned since it
additionally checks for the case that one pool can be returned.

I spend far too much time trying to get different configs to work with the tests
I had some luck using FakeApplication and setting some additionalConfig for it.
However it turns out that if you have two tests using fake config and they are
both different only the first test that runs fake config takes effect and it applies
to all the other runs...

I messed this up somehow ever though I checked it a ton of times. Not sure
how i missed this but I have since learned pattern matching on scala sets
is not that simple. This correctly matches against Sets and non sets. I
updated the test to check for the case of two pools being returned since it
additionally checks for the case that one pool can be returned.

I spend far too much time trying to get different configs to work with the tests
I had some luck using FakeApplication and setting some additionalConfig for it.
However it turns out that if you have two tests using fake config and they are
both different only the first test that runs fake config takes effect and it applies
to all the other runs...
Cleanup dead code and also refactor Set check to remove warning about type
erasure when matching against a set.
@byxorna byxorna self-requested a review June 2, 2017 21:25
Copy link
Contributor

@byxorna byxorna left a comment

Choose a reason for hiding this comment

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

Looks good. If there is a good way to test a config with both 1 and 2 OOB networks, that would be ideal. I am not worried if we dont have it though.

Nice work!

@byxorna
Copy link
Contributor

byxorna commented Jun 2, 2017

pinging @roymarantz @defect to review as well.

Copy link
Contributor

@defect defect left a comment

Choose a reason for hiding this comment

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

👍

@byxorna byxorna merged commit 978bc36 into tumblr:master Jun 8, 2017
@michaeljs1990 michaeljs1990 deleted the fix-ipmi-pool-api branch June 8, 2017 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants