diff options
author | Jim Hahn <jrh3@att.com> | 2020-02-29 14:34:53 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-02-29 14:38:25 -0500 |
commit | 394929613dd177b9715553faa3aa4d35eacf57d1 (patch) | |
tree | b4b7a98af4cd573c38474d74ca8e5f3c5c1d02d4 | |
parent | da47a120294d931bde38d821df8979813564e05c (diff) |
Guard Actor is adding the wrong type of Operator
The Guard Actor should be adding a GuardOperator, but it was
adding an HttpOperator, instead. Fixed the code.
Issue-ID: POLICY-2350
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I03517e993442da13a4dbd1eb0c4a0318b0c1c9f2
2 files changed, 4 insertions, 2 deletions
diff --git a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProvider.java b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProvider.java index e37de57bb..0053213f5 100644 --- a/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProvider.java +++ b/models-interactions/model-actors/actor.guard/src/main/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProvider.java @@ -23,7 +23,6 @@ package org.onap.policy.controlloop.actor.guard; import org.onap.policy.controlloop.actorserviceprovider.impl.HttpActor; -import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperator; import org.onap.policy.controlloop.actorserviceprovider.impl.OperationPartial; public class GuardActorServiceProvider extends HttpActor<GuardActorParams> { @@ -36,6 +35,6 @@ public class GuardActorServiceProvider extends HttpActor<GuardActorParams> { public GuardActorServiceProvider() { super(NAME, GuardActorParams.class); - addOperator(new HttpOperator(NAME, GuardOperation.NAME, GuardOperation::new)); + addOperator(new GuardOperator(NAME, GuardOperation.NAME, GuardOperation::new)); } } diff --git a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProviderTest.java b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProviderTest.java index bb5d4ddf8..6721ff7d0 100644 --- a/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProviderTest.java +++ b/models-interactions/model-actors/actor.guard/src/test/java/org/onap/policy/controlloop/actor/guard/GuardActorServiceProviderTest.java @@ -21,6 +21,7 @@ package org.onap.policy.controlloop.actor.guard; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import java.util.Arrays; import java.util.stream.Collectors; @@ -41,5 +42,7 @@ public class GuardActorServiceProviderTest extends BasicActor { // verify that it all plugs into the ActorService verifyActorService(GuardActorServiceProvider.NAME, "service.yaml"); + + assertTrue(prov.getOperator(GuardOperation.NAME) instanceof GuardOperator); } } |