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

[#1072] [BZ#1775998] Fix logic for providers check on Conversion Hosts Settings page #1086

Merged

Conversation

@mturley
Copy link
Contributor

mturley commented Jan 10, 2020

Fix #1072
The Conversion Hosts Settings page was sharing the same hasSufficientProviders logic as other pages, but the error messaging was inconsistent with that logic. Since you only need a target provider configured to set up a conversion host, I changed the logic to match the error messaging.

RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1775998

@mturley mturley requested a review from mzazrivec Jan 10, 2020
@mturley mturley added this to In progress in v2v UI via automation Jan 10, 2020
const RHV_TYPE = 'ManageIQ::Providers::Redhat::InfraManager';
const OSP_TYPE = 'ManageIQ::Providers::Openstack::CloudManager';

describe('checkSourceProviders helper', () => {

This comment has been minimized.

Copy link
@codeclimate

codeclimate bot Jan 10, 2020

Similar blocks of code found in 2 locations. Consider refactoring.

});
});

describe('checkTargetProviders helper', () => {

This comment has been minimized.

Copy link
@codeclimate

codeclimate bot Jan 10, 2020

Similar blocks of code found in 2 locations. Consider refactoring.

@@ -1,5 +1,9 @@
import { PROVIDERS } from '../providers/providersConstants';

export const sufficientProviders = (providers = []) =>
providers.some(provider => PROVIDERS.source.includes(provider.type)) &&
export const checkSourceProviders = (providers = []) =>

This comment has been minimized.

Copy link
@codeclimate

codeclimate bot Jan 10, 2020

Similar blocks of code found in 2 locations. Consider refactoring.

providers.some(provider => PROVIDERS.source.includes(provider.type)) &&
export const checkSourceProviders = (providers = []) =>
providers.some(provider => PROVIDERS.source.includes(provider.type));
export const checkTargetProviders = (providers = []) =>

This comment has been minimized.

Copy link
@codeclimate

codeclimate bot Jan 10, 2020

Similar blocks of code found in 2 locations. Consider refactoring.

@miq-bot

This comment has been minimized.

Copy link
Member

miq-bot commented Jan 10, 2020

Checked commits mturley/manageiq-v2v@62f0e61~...e6e3dbc with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍪

@mzazrivec mzazrivec merged commit 5b4ee3b into ManageIQ:master Jan 10, 2020
2 of 3 checks passed
2 of 3 checks passed
codeclimate 4 issues to fix
Details
Hakiri No security warnings were found.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
v2v UI automation moved this from In progress to Done Jan 10, 2020
@mturley mturley deleted the mturley:1072-fix-sufficient-providers-check branch Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
v2v UI
  
Done
3 participants
You can’t perform that action at this time.