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

Refactor redhat_customizerequest method for VM Provisioning. #633

Merged

Conversation

pkomanek
Copy link
Contributor

Method refactoring and creating tests.

This PR is based on the issue below.
ManageIQ/manageiq#12038

@miq-bot add_label refactoring
@miq-bot assign @tinaafitz

@coveralls
Copy link

coveralls commented Jan 22, 2020

Pull Request Test Coverage Report for Build 4327

  • 116 of 116 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 97.534%

Totals Coverage Status
Change from base Build 4309: 0.09%
Covered Lines: 3124
Relevant Lines: 3203

💛 - Coveralls

@pkomanek pkomanek force-pushed the redhat_customizerequest_refactoring branch 5 times, most recently from e975b35 to b40a519 Compare January 22, 2020 12:46
@pkomanek pkomanek force-pushed the redhat_customizerequest_refactoring branch 2 times, most recently from b740e40 to a9508a5 Compare February 17, 2020 13:41
@pkomanek pkomanek changed the title [WIP]Refactor redhat_customizerequest method for VM Provisioning. Refactor redhat_customizerequest method for VM Provisioning. Feb 17, 2020
@miq-bot miq-bot removed the wip label Feb 17, 2020
log(:info, "Inspecting prov.eligible_windows_images: #{prov.eligible_windows_images.inspect}")
pxe_image = prov.eligible_windows_images.detect { |pi| pi.name.casecmp(template.name) == 0 }
if pxe_image.nil?
update_and_raise("Failed to find matching PXE Image")
Copy link
Member

Choose a reason for hiding this comment

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

The behavior before is to log in the file, update the object then raise an error.
Seems logging in the file is skipped here. Is it by intention?

@pkomanek pkomanek force-pushed the redhat_customizerequest_refactoring branch from a9508a5 to a8547b2 Compare March 5, 2020 02:42
@miq-bot
Copy link
Member

miq-bot commented Mar 5, 2020

Some comments on commits pkomanek/manageiq-content@0c5f6f3~...a8547b2

spec/content/automate/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/Methods.class/methods/redhat_customizerequest_spec.rb

  • ⚠️ - 237 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

@miq-bot
Copy link
Member

miq-bot commented Mar 5, 2020

Checked commits pkomanek/manageiq-content@0c5f6f3~...a8547b2 with ruby 2.5.7, rubocop 0.69.0, haml-lint 0.20.0, and yamllint
2 files checked, 1 offense detected

content/automate/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/Methods.class/methods/redhat_customizerequest.rb

@tinaafitz tinaafitz merged commit 486fdcc into ManageIQ:master Mar 24, 2020
@pkomanek pkomanek deleted the redhat_customizerequest_refactoring branch March 24, 2020 15:01
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