aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java')
-rw-r--r--src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java b/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
index 615826ed..8089bf1a 100644
--- a/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
+++ b/src/test/java/org/onap/clamp/loop/LoopServiceTestItCase.java
@@ -40,6 +40,7 @@ import org.onap.clamp.clds.util.JsonUtils;
import org.onap.clamp.loop.log.LogType;
import org.onap.clamp.loop.log.LoopLog;
import org.onap.clamp.loop.log.LoopLogService;
+import org.onap.clamp.loop.template.LoopTemplate;
import org.onap.clamp.policy.microservice.MicroServicePolicy;
import org.onap.clamp.policy.microservice.MicroServicePolicyService;
import org.onap.clamp.policy.operational.OperationalPolicy;
@@ -175,6 +176,9 @@ public class LoopServiceTestItCase {
private void saveTestLoopToDb() {
Loop testLoop = createTestLoop(EXAMPLE_LOOP_NAME, "blueprint", "representation");
testLoop.setGlobalPropertiesJson(JsonUtils.GSON.fromJson(EXAMPLE_JSON, JsonObject.class));
+ LoopTemplate template = new LoopTemplate();
+ template.setName("testTemplate");
+ testLoop.setLoopTemplate(template);
loopService.saveOrUpdateLoop(testLoop);
}
@@ -296,6 +300,9 @@ public class LoopServiceTestItCase {
// Add log
Loop loop = loopsRepository.findById(EXAMPLE_LOOP_NAME).orElse(null);
loop.addLog(new LoopLog("test", LogType.INFO, "CLAMP", loop));
+ LoopTemplate template = new LoopTemplate();
+ template.setName("testTemplate");
+ loop.setLoopTemplate(template);
loop = loopService.saveOrUpdateLoop(loop);
// Add op policy
OperationalPolicy operationalPolicy = new OperationalPolicy("opPolicy", null,