Obtain and control VSP package upload status
[sdc.git] / openecomp-be / api / openecomp-sdc-rest-webapp / vendor-software-products-rest / vendor-software-products-rest-services / src / test / java / org / openecomp / sdcrests / vsp / rest / services / OrchestrationTemplateCandidateImplTest.java
index 758505f..6c21cc4 100644 (file)
@@ -223,8 +223,12 @@ class OrchestrationTemplateCandidateImplTest {
 
     @Test
     void uploadSignNotValidTest() throws IOException {
+        //given
+        when(orchestrationTemplateCandidateUploadManager.putUploadInValidation(candidateId, versionId, user)).thenReturn(new VspUploadStatusDto());
+        //when
         Response response = orchestrationTemplateCandidate
-            .upload("1", "1", mockAttachment("filename.zip", null), user);
+            .upload(candidateId, versionId, mockAttachment("filename.zip", null), user);
+        //then
         assertEquals(Status.NOT_ACCEPTABLE.getStatusCode(), response.getStatus());
         assertFalse(((UploadFileResponseDto) response.getEntity()).getErrors().isEmpty());
     }