diff options
author | 2022-01-25 19:38:32 +0000 | |
---|---|---|
committer | 2022-01-31 15:23:21 +0000 | |
commit | 4594cba0c53461bc1a273458e0a7a314da6bfb68 (patch) | |
tree | c78010c789d726aa72ee8591ab12720b72d1c675 /openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp | |
parent | 99b7fb519806870b3c84e9e1ac0ac2f59320a6b0 (diff) |
Obtain and control VSP package upload status
Obtain the upload status and control the upload from the frontend
perspective.
Change-Id: Idcc921cf592efea33df35c557afcfae827af3a39
Issue-ID: SDC-3862
Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp')
1 files changed, 15 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VspUploadStatusRecordDaoImlTest.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VspUploadStatusRecordDaoImlTest.java index cd0bc1cd1e..f17d250a32 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VspUploadStatusRecordDaoImlTest.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/VspUploadStatusRecordDaoImlTest.java @@ -130,4 +130,19 @@ class VspUploadStatusRecordDaoImlTest { assertEquals(mostRecentVspUploadStatus, vspUploadStatusOptional.get()); } + @Test + void findLatest_noEntryFoundTest() { + //given + final String vspId = "vspId"; + final String vspVersionId = "vspVersionId"; + final Result<VspUploadStatusRecord> resultMock = mock(Result.class); + when(resultMock.all()).thenReturn(new ArrayList<>()); + + when(accessor.findAllByVspIdAndVspVersionId(vspId, vspVersionId)).thenReturn(resultMock); + //when + final Optional<VspUploadStatusRecord> vspUploadStatusOptional = packageUploadManagerDaoIml.findLatest(vspId, vspVersionId); + //then + assertTrue(vspUploadStatusOptional.isEmpty()); + } + }
\ No newline at end of file |