aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-01-15 15:14:02 +0100
committersebdet <sebastien.determe@intl.att.com>2021-01-22 19:29:08 +0100
commit4eb73f0738a5abd5c5bd5e252162234ec024d1f8 (patch)
tree01e1798d0275305a946cf5dd6021f4aee8350ee1 /src/test/java
parentfc2c1e0287ec425846fb4bbb437a43308f2d774b (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 (cherry picked from commit dabd6db614abf78508add7cdbef2120120ce3d9b) Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: Ia8e7a80a3adb205de2bdb4a1a9051a734b424980
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/onap/policy/clamp/loop/CsarInstallerItCase.java11
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,