diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2021-02-18 12:01:05 -0600 |
---|---|---|
committer | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2021-02-18 18:57:04 +0000 |
commit | a4e239da971509dfa2ffcd6c138abc87bc5d0aec (patch) | |
tree | c519d89da42177716c42cdea23ec0835b684b3d8 /feature-lifecycle/src/test/java | |
parent | dd8c5ad785a19c3af7249808aa01fe4f04abc61e (diff) |
support pdp-type configuration for PAP status
Issue-ID: POLICY-3070
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iaddd9bac102cbe79626fe91d78a457dcfd4cb1fb
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'feature-lifecycle/src/test/java')
3 files changed, 9 insertions, 2 deletions
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java index 9dda01df..54e32d3a 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java @@ -178,6 +178,11 @@ public class LifecycleFsmTest { } @Test + public void testPdpType() { + assertEquals("foo", fsm.getPdpType()); + } + + @Test public void testDeployedPolicyAction() { fsm.deployedPolicyAction(controllerPolicy); assertEquals(1, fsm.getStats().getPolicyDeploySuccessCount()); diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java index 0ce1f821..ac0859e7 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -224,6 +224,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest { "1.0.0"))); PdpStatus cachedStatus = new StandardCoder() .decode(fsm.client.getSink().getRecentEvents()[qlength], PdpStatus.class); + assertEquals("foo", cachedStatus.getPdpType()); assertEquals(new ArrayList<>(fsm.policiesMap.keySet()), cachedStatus.getPolicies()); List<ToscaPolicy> factPolicies = controllerSupport.getFacts(ToscaPolicy.class); diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java index 6945f10a..ef01a593 100644 --- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java +++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java @@ -158,6 +158,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { int qlength = fsm.client.getSink().getRecentEvents().length; PdpStatus lastStatus = new StandardCoder().decode(fsm.client.getSink().getRecentEvents()[qlength - 1], PdpStatus.class); + assertEquals("foo", lastStatus.getPdpType()); assertEquals(update.getRequestId(), lastStatus.getRequestId()); assertEquals(update.getRequestId(), lastStatus.getResponse().getResponseTo()); @@ -327,7 +328,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest { String[] events = fsm.client.getSink().getRecentEvents(); PdpStatus status = new StandardCoder().decode(events[events.length - 1], PdpStatus.class); - assertEquals("drools", status.getPdpType()); + assertEquals("foo", status.getPdpType()); assertEquals(PdpState.TERMINATED, status.getState()); assertEquals(PdpHealthStatus.HEALTHY, status.getHealthy()); assertEquals(NetworkUtil.getHostname(), status.getName()); |