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

Move ImageValidator and DescriptionValidator validations to IntegrationValidator #330

Merged
merged 4 commits into from
Apr 6, 2020

Conversation

Itay4
Copy link
Contributor

@Itay4 Itay4 commented Apr 6, 2020

Status

  • Ready

Description

Moved ImageValidator and DescriptionValidator validations from file_validator to integration

Must have

  • Tests

@Itay4 Itay4 requested a review from yaakovi April 6, 2020 10:16
@@ -66,15 +75,18 @@ def is_valid_file(self, validate_rn=True):
self.is_valid_fetch(),
self.is_valid_display_name(),
self.is_all_params_not_hidden(),
self.is_valid_image(),
self.is_valid_description(beta_integration=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.is_valid_description(beta_integration=False)
self.is_valid_description(beta_integration=False),

"""Check whether the beta Integration is valid or not, update the _is_valid field to determine that"""
answers = [
self.is_valid_default_arguments(),
self.is_valid_beta(),
self.is_valid_image(),
self.is_valid_description(beta_integration=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.is_valid_description(beta_integration=True)
self.is_valid_description(beta_integration=True),

Returns:
bool. True if there aren't hidden parameters False otherwise.
bool: True if description image/logo is valid, False otherwise.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bool: True if description image/logo is valid, False otherwise.
bool: True if integration description is valid, False otherwise.

@Itay4
Copy link
Contributor Author

Itay4 commented Apr 6, 2020

@yaakovi please see my changes:

  • applied your suggestions
  • reverted is_all_params_not_hidden func removal
  • adjusted test_is_valid_beta_integration to check is_valid_beta instead of is_valid_beta_integration as it validates only display name anyway

@Itay4 Itay4 requested a review from yaakovi April 6, 2020 14:30
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 2322

  • 13 of 17 (76.47%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.9%) to 57.205%

Changes Missing Coverage Covered Lines Changed/Added Lines %
demisto_sdk/commands/common/hook_validations/integration.py 13 17 76.47%
Files with Coverage Reduction New Missed Lines %
demisto_sdk/commands/validate/file_validator.py 2 0%
demisto_sdk/commands/common/hook_validations/integration.py 3 88.24%
Totals Coverage Status
Change from base Build 2304: 0.9%
Covered Lines: 4323
Relevant Lines: 7557

💛 - Coveralls

Copy link
Contributor

@yaakovi yaakovi left a comment

Choose a reason for hiding this comment

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

good catch
looks good now

@Itay4 Itay4 merged commit 310ec20 into master Apr 6, 2020
@Itay4 Itay4 deleted the integration-validator-reorder branch April 6, 2020 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants