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

Changed validate_quota method to check individual quota items. #375

Merged

Conversation

billfitzgerald0120
Copy link
Contributor

Vm Reconfigure was failing on quota when a different quota item was exceeded.

For Vm Reconfigure, If we add a disk it shouldn't deny because memory, cpus or number of vm's is exceeded. If we add memory the request should not be denied because of storage, cpus or vm's.

Fixes ManageIQ/manageiq-automation_engine#150

@billfitzgerald0120
Copy link
Contributor Author

@miq-bot add_label bug
@miq-bot assign @gmcculloug

@billfitzgerald0120
Copy link
Contributor Author

@tinaafitz Please Review

expect(@miq_request.message).to eql(err_msg)
end

it "failure max memory" do
Copy link
Contributor

Choose a reason for hiding this comment

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

@billfitzgerald0120 Is this a repeat of previous test from line 159 to 170

@miq_request.reload
expect(@miq_request.options[:quota_max_exceeded]).to eql(err_msg)
expect(@miq_request.message).to eql(err_msg)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

@billfitzgerald0120 can we make this a shared example and feed different values into it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mkanoor Created 2 shared examples, one for Provisioning and one for Reconfigure

…denying quota.

For Vm Reconfigure, If we add a disk it shouldn't deny because memory, cpus or number of vms is exceeded.

Fixes ManageIQ/manageiq-automation_engine#150

Updated spec and added 4 new tests.
Created 2 shared examples, one for Provisioning and one for Reconfigure
@miq-bot
Copy link
Member

miq-bot commented Aug 8, 2018

Checked commit billfitzgerald0120@3f26339 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@billfitzgerald0120
Copy link
Contributor Author

@mkanoor Please review

@mkanoor mkanoor merged commit 98b1d11 into ManageIQ:master Aug 8, 2018
@mkanoor mkanoor added this to the Sprint 92 Ending Aug 13, 2018 milestone Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants