def test_run_all_validations_on_file(self, _, file_path, file_type): """ Given - A file in packs or beta integration When - running run_all_validations_on_file on that file Then - The file will be validated """ file_validator = FilesValidator(skip_conf_json=True) file_validator.run_all_validations_on_file(file_path, file_type) assert file_validator._is_valid
def test_run_all_validations_on_file(self, _, file_path, file_type): """ Given - A file in packs or beta integration When - running run_all_validations_on_file on that file Then - If the file is not json,yml or md- it will be skipped (will be considered as valid) - If the file is a CHANGELOG or DESCRIPTION it will be skipped (will be considered as valid) - In any other case the file will be validated """ file_validator = FilesValidator(validate_conf_json=False) file_validator.run_all_validations_on_file(file_path, file_type) assert file_validator._is_valid
def test_unified_files_ignored(self): """ Given - A unified yml file When - Validating it Then - validator should ignore those files """ file_validator = FilesValidator() file_validator.validate_modified_files( {INVALID_IGNORED_UNIFIED_INTEGRATION}) assert file_validator._is_valid file_validator.validate_added_files( {INVALID_IGNORED_UNIFIED_INTEGRATION}) assert file_validator._is_valid file_validator.run_all_validations_on_file( INVALID_IGNORED_UNIFIED_INTEGRATION) assert file_validator._is_valid