X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Fclamp%2Floop%2FLoopRepositoriesItCase.java;h=164625fef35112a283502c751286452722563b3d;hb=897a3e004a858ef68d989dad15dde91a69e151a5;hp=47b4b65c3384273f617833434af5d00b659dff31;hpb=f0e00e7c9ea8dd15a4aacdd880aa648539caf087;p=clamp.git diff --git a/src/test/java/org/onap/clamp/loop/LoopRepositoriesItCase.java b/src/test/java/org/onap/clamp/loop/LoopRepositoriesItCase.java index 47b4b65c..164625fe 100644 --- a/src/test/java/org/onap/clamp/loop/LoopRepositoriesItCase.java +++ b/src/test/java/org/onap/clamp/loop/LoopRepositoriesItCase.java @@ -90,7 +90,8 @@ public class LoopRepositoriesItCase { } private OperationalPolicy getOperationalPolicy(String configJson, String name, PolicyModel policyModel) { - return new OperationalPolicy(name, null, new Gson().fromJson(configJson, JsonObject.class), policyModel, null, null, null); + return new OperationalPolicy(name, null, new Gson().fromJson(configJson, JsonObject.class), policyModel, + null, null, null); } private LoopElementModel getLoopElementModel(String yaml, String name, String policyType, String createdBy, @@ -105,11 +106,13 @@ public class LoopRepositoriesItCase { return new PolicyModel(policyType, policyModelTosca, version, policyAcronym); } - private LoopTemplate getLoopTemplate(String name, String blueprint, String svgRepresentation, String createdBy, - Integer maxInstancesAllowed) { + private LoopTemplate getLoopTemplates(String name, String blueprint, String svgRepresentation, String createdBy, + Integer maxInstancesAllowed) { LoopTemplate template = new LoopTemplate(name, blueprint, svgRepresentation, maxInstancesAllowed, null); template.addLoopElementModel(getLoopElementModel("yaml", "microService1", "org.onap.policy.drools", createdBy, getPolicyModel("org.onap.policy.drools", "yaml", "1.0.0", "Drools"))); + template.addLoopElementModel(getLoopElementModel("yaml", "oppolicy1", "org.onap.policy.drools.legacy", + createdBy, getPolicyModel("org.onap.policy.drools.legacy", "yaml", "1.0.0", "DroolsLegacy"))); loopTemplateRepository.save(template); return template; } @@ -123,7 +126,7 @@ public class LoopRepositoriesItCase { loop.setLastComputedState(LoopState.DESIGN); loop.setDcaeDeploymentId(dcaeId); loop.setDcaeDeploymentStatusUrl(dcaeUrl); - loop.setLoopTemplate(getLoopTemplate("templateName", "yaml", "svg", "toto", 1)); + loop.setLoopTemplate(getLoopTemplates("templateName", "yaml", "svg", "toto", 1)); return loop; } @@ -149,7 +152,7 @@ public class LoopRepositoriesItCase { Loop loopTest = getLoop("ControlLoopTest", "", "yamlcontent", "{\"testname\":\"testvalue\"}", "123456789", "https://dcaetest.org", "UUID-blueprint"); OperationalPolicy opPolicy = this.getOperationalPolicy("{\"type\":\"GUARD\"}", "GuardOpPolicyTest", - getPolicyModel("org.onap.policy.drools", "yaml", "1.0.0", "Drools")); + getPolicyModel("org.onap.policy.drools.legacy", "yaml", "1.0.0", "DroolsLegacy")); loopTest.addOperationalPolicy(opPolicy); MicroServicePolicy microServicePolicy = getMicroServicePolicy("configPolicyTest", "{\"configtype\":\"json\"}", "{\"param1\":\"value1\"}", true, getPolicyModel("org.onap.policy.drools", "yaml", "1.0.0", "Drools"));