}
validationResponse.setUploadDataErrors(validateOrchestrationTemplate(orchestrationTemplate));
}
- Collection<ComponentDependencyModelEntity> componentDependencies =
- componentDependencyModelDao.list(new ComponentDependencyModelEntity(vspId, version, null));
QuestionnaireValidationResult questionnaireValidationResult = validateQuestionnaire
(vspDetails.getId(), vspDetails.getVersion(), vspDetails.getOnboardingMethod());
}
}
+ Collection<ComponentDependencyModelEntity> componentDependencies =
+ componentDependencyModelDao.list(new ComponentDependencyModelEntity(vspId, version, null));
+
if (validateComponentDependencies(componentDependencies)) {
vspErrors
.add(ComponentDependencyModelErrorBuilder.getcyclicDependencyComponentErrorBuilder());
if (validationData.isEmpty()) {
vspErrors.add(VendorSoftwareProductInvalidErrorBuilder
.candidateDataNotProcessedOrAbortedErrorBuilder(fileName));
- validationResponse.setVspErrors(vspErrors);
} else {
vspErrors.add(VendorSoftwareProductInvalidErrorBuilder.invalidProcessedCandidate(fileName));
- validationResponse.setVspErrors(vspErrors);
}
+ validationResponse.setVspErrors(vspErrors);
}
}
}
*/
@Test
- public void testSubmitWithCandidateDataNotProcessed() throws IOException {
+ public void testValidateWithCandidateDataNotProcessed() throws IOException {
VspDetails vsp =
createVspDetails(VSP_ID, VERSION01, "Vsp1", "Test-vsp", "vendorName", "vlm1Id", "icon",
"category", "subCategory", "licenseAgreementId",
Assert.assertNotNull(validationResponse.getVspErrors());
Assert.assertEquals(validationResponse.getVspErrors().size(), 1);
- verify(versioningManagerMock, never())
- .submit(VendorSoftwareProductConstants.VENDOR_SOFTWARE_PRODUCT_VERSIONABLE_TYPE, VSP_ID,
- USER1, null);
}
@Test
- public void testSubmitWithCandidateProcessedIsInvalid() throws IOException {
+ public void testValidateWithCandidateProcessedIsInvalid() throws IOException {
VspDetails vsp = createVspDetails(VSP_ID, VERSION01, "Vsp1", "Test-VSP", "vendorName",
"vl1Id", "icond", "category", "subcategory", "licenseAgreementId", Collections
.singletonList("featureGroupId"));
Assert.assertFalse(validationResponse.isValid());
Assert.assertNotNull(validationResponse.getVspErrors());
Assert.assertEquals(validationResponse.getVspErrors().size(), 1);
-
- verify(versioningManagerMock, never())
- .submit(VendorSoftwareProductConstants.VENDOR_SOFTWARE_PRODUCT_VERSIONABLE_TYPE, VSP_ID,
- USER1, null);
}
private void testLegalUpload(String vspId, Version version, InputStream upload, String user) {