diff options
author | sebdet <sebastien.determe@intl.att.com> | 2021-01-15 15:14:02 +0100 |
---|---|---|
committer | S�bastien Determe <sebastien.determe@intl.att.com> | 2021-01-15 14:33:37 +0000 |
commit | dabd6db614abf78508add7cdbef2120120ce3d9b (patch) | |
tree | 06463fc6620fd5bd865e44da2030ea0b5a3f05db /src/test/java/org | |
parent | b22a94355099b0802d1dc5da8d69fd90cd8db63e (diff) |
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 <sebastien.determe@intl.att.com>
Change-Id: I716cfbaa1a084df1455da25470d86b903ef7c936
Diffstat (limited to 'src/test/java/org')
-rw-r--r-- | src/test/java/org/onap/policy/clamp/loop/CsarInstallerItCase.java | 11 |
1 files changed, 10 insertions, 1 deletions
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, |