aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.so
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-03-23 15:04:46 -0400
committerJim Hahn <jrh3@att.com>2020-03-23 16:03:48 -0400
commit56bc6f68baeb376b99e0dbe4de4790f494dbe3c2 (patch)
tree70e5282b76cbe48aa63bcdd4a88f67c3a4919c44 /models-interactions/model-actors/actor.so
parentef5768de060c6cbf10b06569e00617b052dc7e61 (diff)
New Guard actor request structure is incorrect
Missing various fields within the request structure (e.g., ONAPName). Fixed. In the process, also modified makeGuardPayload() so that it only constructs the inner "guard" JSON object, making it easier for invoking code to modify it. Issue-ID: POLICY-2434 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I7d34a279845bb98425caf66565eab7513d310815
Diffstat (limited to 'models-interactions/model-actors/actor.so')
-rw-r--r--models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java10
-rw-r--r--models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java10
2 files changed, 2 insertions, 18 deletions
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java
index 8c084b8dc..1d5d44cc8 100644
--- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleCreateTest.java
@@ -132,15 +132,7 @@ public class VfModuleCreateTest extends BasicSoOperation {
Map<String, Object> payload = captor.getValue().getPayload();
assertNotNull(payload);
- @SuppressWarnings("unchecked")
- Map<String, Object> resource = (Map<String, Object>) payload.get("resource");
- assertNotNull(resource);
-
- @SuppressWarnings("unchecked")
- Map<String, Object> guard = (Map<String, Object>) resource.get("guard");
- assertNotNull(guard);
-
- Integer newCount = (Integer) guard.get(VfModuleCreate.PAYLOAD_KEY_VF_COUNT);
+ Integer newCount = (Integer) payload.get(VfModuleCreate.PAYLOAD_KEY_VF_COUNT);
assertNotNull(newCount);
assertEquals(origCount + 1, newCount.intValue());
}
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java
index c08fa37d1..cb2bceffd 100644
--- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/VfModuleDeleteTest.java
@@ -166,15 +166,7 @@ public class VfModuleDeleteTest extends BasicSoOperation {
Map<String, Object> payload = captor.getValue().getPayload();
assertNotNull(payload);
- @SuppressWarnings("unchecked")
- Map<String, Object> resource = (Map<String, Object>) payload.get("resource");
- assertNotNull(resource);
-
- @SuppressWarnings("unchecked")
- Map<String, Object> guard = (Map<String, Object>) resource.get("guard");
- assertNotNull(guard);
-
- Integer newCount = (Integer) guard.get(VfModuleDelete.PAYLOAD_KEY_VF_COUNT);
+ Integer newCount = (Integer) payload.get(VfModuleDelete.PAYLOAD_KEY_VF_COUNT);
assertNotNull(newCount);
assertEquals(origCount - 1, newCount.intValue());
}