diff options
author | Ravi Mantena <rx908f@att.com> | 2020-10-02 11:10:15 -0400 |
---|---|---|
committer | Ravi Mantena <rx908f@att.com> | 2020-10-02 11:47:26 -0400 |
commit | 3708e8fed17cb2af766296bcba2bf4ccf535b0ec (patch) | |
tree | 8957c09d2bebbf089db1256e53b0684f21d2cd6f /mod2/catalog-service/src/test/java | |
parent | e4668da0683be7194f45cd8d259eeb75ebdb98a8 (diff) |
updating docker repository to onap nexus for Catalog Service and Auth Service
Issue-ID: DCAEGEN2-2317
Change-Id: Id1ca3eb92586d859cf757779b77e6b89bc641df2
Signed-off-by: Ravi Mantena <rx908f@att.com>
Diffstat (limited to 'mod2/catalog-service/src/test/java')
-rw-r--r-- | mod2/catalog-service/src/test/java/org/onap/dcaegen2/platform/mod/web/service/deploymentartifact/DeploymentArtifactServiceImplTest.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mod2/catalog-service/src/test/java/org/onap/dcaegen2/platform/mod/web/service/deploymentartifact/DeploymentArtifactServiceImplTest.java b/mod2/catalog-service/src/test/java/org/onap/dcaegen2/platform/mod/web/service/deploymentartifact/DeploymentArtifactServiceImplTest.java index 749d8b1..9074650 100644 --- a/mod2/catalog-service/src/test/java/org/onap/dcaegen2/platform/mod/web/service/deploymentartifact/DeploymentArtifactServiceImplTest.java +++ b/mod2/catalog-service/src/test/java/org/onap/dcaegen2/platform/mod/web/service/deploymentartifact/DeploymentArtifactServiceImplTest.java @@ -25,8 +25,11 @@ import org.onap.dcaegen2.platform.mod.model.deploymentartifact.DeploymentArtifac import org.onap.dcaegen2.platform.mod.model.exceptions.deploymentartifact.DeploymentArtifactNotFound; import org.onap.dcaegen2.platform.mod.model.microserviceinstance.MsInstance; import org.onap.dcaegen2.platform.mod.model.restapi.DeploymentArtifactPatchRequest; +import org.onap.dcaegen2.platform.mod.model.specification.DeploymentType; +import org.onap.dcaegen2.platform.mod.model.specification.Specification; import org.onap.dcaegen2.platform.mod.objectmothers.DeploymentArtifactObjectMother; import org.onap.dcaegen2.platform.mod.objectmothers.MsInstanceObjectMother; +import org.onap.dcaegen2.platform.mod.objectmothers.SpecificationObjectMother; import org.onap.dcaegen2.platform.mod.web.service.microserviceinstance.MsInstanceService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -36,6 +39,7 @@ import org.mockito.junit.jupiter.MockitoExtension; import java.util.Arrays; import java.util.List; +import java.util.Map; import java.util.Optional; import static org.onap.dcaegen2.platform.mod.objectmothers.MsInstanceObjectMother.*; @@ -99,6 +103,19 @@ class DeploymentArtifactServiceImplTest { } @Test + void test_GenerateForRelease_shouldReturnCorrectBlueprint(){ + Specification specification = SpecificationObjectMother.getMockSpecification(DeploymentType.K8S); + when(deploymentArtifactGeneratorStrategy.generateForRelease(specification, "")).thenReturn(DeploymentArtifactObjectMother.createBlueprintResponse()); + Map<String, Object> response = deploymentArtifactGeneratorStrategy.generateForRelease(specification, ""); + verify(deploymentArtifactGeneratorStrategy, atLeastOnce()).generateForRelease(specification,""); + assertThat(response).isNotNull(); + assertThat(response.get("content")).isNotNull(); + assertThat(response.get("fileName")).isNotNull(); + assertThat((String)response.get("content")).contains("tosca_definitions_version"); + + } + + @Test void test_GenerateBlueprint_shouldReturnCorrectBlueprint() throws Exception{ setupMockBehaviours(); |