From dabd6db614abf78508add7cdbef2120120ce3d9b Mon Sep 17 00:00:00 2001 From: sebdet Date: Fri, 15 Jan 2021 15:14:02 +0100 Subject: Add policies list and PDP responses in the emulator - Add some specific answers to the emulator so that the backend list code can be tested - add guilin tca blueprint to the integration tests so that the test.sql contains a new template. Issue-ID: POLICY-2924 Signed-off-by: sebdet Change-Id: I716cfbaa1a084df1455da25470d86b903ef7c936 --- .../java/org/onap/policy/clamp/loop/CsarInstallerItCase.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/test/java/org/onap') diff --git a/src/test/java/org/onap/policy/clamp/loop/CsarInstallerItCase.java b/src/test/java/org/onap/policy/clamp/loop/CsarInstallerItCase.java index 8ef0df5e4..5b67f1f3a 100644 --- a/src/test/java/org/onap/policy/clamp/loop/CsarInstallerItCase.java +++ b/src/test/java/org/onap/policy/clamp/loop/CsarInstallerItCase.java @@ -128,7 +128,7 @@ public class CsarInstallerItCase { Mockito.when(csarHandler.getMapOfBlueprints()).thenReturn(blueprintMap); // Create fake blueprint artifact 1 on resource1 BlueprintArtifact blueprintArtifact = buildFakeBuildprintArtifact(RESOURCE_INSTANCE_NAME_RESOURCE1, - INVARIANT_RESOURCE1_UUID, "example/sdc/blueprint-dcae/tca-guilin.yaml", "tca-guilin.yaml", + INVARIANT_RESOURCE1_UUID, "example/sdc/blueprint-dcae/tca-bad-policy.yaml", "tca-bad-policy.yaml", INVARIANT_SERVICE_UUID); listResources.add(blueprintArtifact.getResourceAttached()); blueprintMap.put(blueprintArtifact.getBlueprintArtifactName(), blueprintArtifact); @@ -183,6 +183,13 @@ public class CsarInstallerItCase { "example/sdc/blueprint-dcae/tca_3.yaml", "tca_3.yaml", INVARIANT_SERVICE_UUID); blueprintMap.put(blueprintArtifact.getBlueprintArtifactName(), blueprintArtifact); + // Create fake blueprint artifact 3 on resource 1 so that it's possible to + // test multiple CL deployment per Service/vnf + blueprintArtifact = buildFakeBuildprintArtifact(RESOURCE_INSTANCE_NAME_RESOURCE1, INVARIANT_RESOURCE1_UUID, + "example/sdc/blueprint-dcae/tca-guilin.yaml", "tca-guilin.yaml", INVARIANT_SERVICE_UUID); + blueprintMap.put(blueprintArtifact.getBlueprintArtifactName(), blueprintArtifact); + + // Build fake csarhandler Mockito.when(csarHandler.getSdcNotification()).thenReturn(notificationData); // Build fake csar Helper @@ -275,6 +282,8 @@ public class CsarInstallerItCase { RESOURCE_INSTANCE_NAME_RESOURCE1, "tca_3.yaml"))).isTrue(); assertThat(loopTemplatesRepo.existsById(LoopTemplate.generateLoopTemplateName(generatedName, "1.0", RESOURCE_INSTANCE_NAME_RESOURCE2, "tca_2.yaml"))).isTrue(); + assertThat(loopTemplatesRepo.existsById(LoopTemplate.generateLoopTemplateName(generatedName, "1.0", + RESOURCE_INSTANCE_NAME_RESOURCE1, "tca-guilin.yaml"))).isTrue(); // Verify now that policy and json representation, global properties are well // set LoopTemplate loopTemplate = loopTemplatesRepo.findById(LoopTemplate.generateLoopTemplateName(generatedName, -- cgit