aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java3
-rw-r--r--participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProviderTest.java9
-rw-r--r--participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/main/parameters/CommonTestData.java4
3 files changed, 16 insertions, 0 deletions
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java
index dc1bb051a..cc61c4739 100644
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java
@@ -174,7 +174,10 @@ public class CacheProvider {
acElement.setDefinition(element.getDefinition());
acElement.setDeployState(element.getDeployState());
acElement.setLockState(element.getLockState());
+ acElement.setOperationalState(element.getOperationalState());
+ acElement.setUseState(element.getUseState());
acElement.setProperties(element.getProperties());
+ acElement.setOutProperties(element.getOutProperties());
acElement.setRestarting(true);
acElementMap.put(element.getId(), acElement);
}
diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProviderTest.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProviderTest.java
index e55de0192..33bd93fb2 100644
--- a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProviderTest.java
+++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProviderTest.java
@@ -153,5 +153,14 @@ class CacheProviderTest {
var result = cacheProvider.getAutomationComposition(participantRestartAc.getAutomationCompositionId());
assertEquals(compositionId, result.getCompositionId());
assertEquals(participantRestartAc.getAutomationCompositionId(), result.getInstanceId());
+ for (var acElementRestart : participantRestartAc.getAcElementList()) {
+ var element = result.getElements().get(acElementRestart.getId());
+ assertEquals(element.getOperationalState(), acElementRestart.getOperationalState());
+ assertEquals(element.getUseState(), acElementRestart.getUseState());
+ assertEquals(element.getLockState(), acElementRestart.getLockState());
+ assertEquals(element.getDeployState(), acElementRestart.getDeployState());
+ assertEquals(element.getProperties(), acElementRestart.getProperties());
+ assertEquals(element.getOutProperties(), acElementRestart.getOutProperties());
+ }
}
}
diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/main/parameters/CommonTestData.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/main/parameters/CommonTestData.java
index 46894fb43..4345d48c4 100644
--- a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/main/parameters/CommonTestData.java
+++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/main/parameters/CommonTestData.java
@@ -237,6 +237,10 @@ public class CommonTestData {
acElementRestart.setDefinition(getDefinition());
acElementRestart.setDeployState(DeployState.DEPLOYED);
acElementRestart.setLockState(LockState.LOCKED);
+ acElementRestart.setOperationalState("OperationalState");
+ acElementRestart.setUseState("UseState");
+ acElementRestart.setProperties(Map.of("key", "value"));
+ acElementRestart.setOutProperties(Map.of("keyOut", "valueOut"));
acElementRestart.setId(UUID.randomUUID());
participantRestartAc.getAcElementList().add(acElementRestart);
return participantRestartAc;