-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add an 'Allocated cpu cores' chargeback rate detail to existing chargeback rates #108
Conversation
2425ed9
to
0fb92e3
Compare
@@ -0,0 +1,27 @@ | |||
class AddCoresAllocatedRateDetail < ActiveRecord::Migration[5.0] | |||
def up |
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.
c47de66
to
51360c8
Compare
Doesn't seeding handle this? @lpichler ? |
@Fryguy no, this is needed for existing |
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.
👍
cc @gtanzillo
|
||
migrate | ||
|
||
expect(default_rate.chargeback_rate_details.where(:description => "Allocated CPU Cores").count).to eq(1) |
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.
Since the default_rate object is memoized from the call on line 25, can you change this to a default_rate.reload.chargeback_rate_details...
? This way we can ensure it's getting fresh data.
migrate | ||
|
||
expect(default_rate.chargeback_rate_details.where(:description => "Allocated CPU Cores").count).to eq(1) | ||
expect(custom_rate.chargeback_rate_details.where(:description => "Allocated CPU Cores").count).to eq(1) |
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.
Same
51360c8
to
008367e
Compare
Done @Fryguy |
Checked commit zeari@008367e with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0 |
Adds the rate detail used in ManageIQ/manageiq#15616 to existing chargeback rates
@lpichler Please review
cc @moolitayer @cben @simon3z