summaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src/test/java/org
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2021-05-31 11:21:07 +0100
committerWayneDunican <wayne.dunican@est.tech>2021-05-31 11:33:04 +0100
commit5608b5f613b0ea13232b8dfc266b8d7f9b20967b (patch)
tree4775cb28ced486bca44f7dbe0abc8125ecf5be7c /feature-lifecycle/src/test/java/org
parenteccb0fb947b90d027460a9de9025b1ca07a9d745 (diff)
Remove policies field references from tests
Remove policies field references from drools-pdp as this has since been removed from the PdpUpdate class in policy-models Issue-ID: POLICY-3339 Change-Id: Ib47408f54318a861fc569beed683e5cffcb2738e Signed-off-by: waynedunican <wayne.dunican@est.tech> Signed-off-by: WayneDunican <wayne.dunican@est.tech>
Diffstat (limited to 'feature-lifecycle/src/test/java/org')
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmUpdateTest.java2
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java6
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java2
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java3
4 files changed, 4 insertions, 9 deletions
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmUpdateTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmUpdateTest.java
index 74d20898..1927c513 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmUpdateTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmUpdateTest.java
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -365,7 +366,6 @@ public class LifecycleFsmUpdateTest {
update.setName(NetworkUtil.getHostname());
update.setPdpGroup("A");
update.setPdpSubgroup("a");
- update.setPolicies(List.of());
update.setPoliciesToBeDeployed(policiesToDeploy);
update.setPoliciesToBeUndeployed(fsm.getPolicyIds(policiesToUndeploy));
return update;
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 bd6b392d..2efaa496 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
@@ -245,7 +245,6 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
// undeploy operational.restart policy
- update.setPolicies(List.of());
update.setPoliciesToBeDeployed(List.of());
update.setPoliciesToBeUndeployed(List.of(toscaPolicyRestartV1.getIdentifier()));
assertTrue(fsm.update(update));
@@ -261,7 +260,6 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
// redeploy operational.restart policy
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of());
update.setPoliciesToBeDeployed(List.of(toscaPolicyRestartV1));
assertTrue(fsm.update(update));
@@ -282,7 +280,6 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
getExamplesPolicy("policies/vCPE.policy.operational.input.tosca.json", "operational.restart");
toscaPolicyRestartV2.setVersion("2.0.0");
toscaPolicyRestartV2.getProperties().put("controllerName", "lifecycle");
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of(toscaPolicyRestartV1.getIdentifier()));
update.setPoliciesToBeDeployed(List.of(toscaPolicyRestartV2));
assertTrue(fsm.update(update));
@@ -303,7 +300,6 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
ToscaPolicy toscaPolicyFirewall =
getExamplesPolicy("policies/vFirewall.policy.operational.input.tosca.json", "operational.modifyconfig");
toscaPolicyFirewall.getProperties().put("controllerName", "lifecycle");
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of());
update.setPoliciesToBeDeployed(List.of(toscaPolicyRestartV2, toscaPolicyFirewall));
assertTrue(fsm.update(update));
@@ -324,7 +320,6 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
long interval = 10 * originalInterval;
update.setPdpHeartbeatIntervalMs(interval * 1000L);
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of());
update.setPoliciesToBeDeployed(List.of());
assertTrue(fsm.update(update));
@@ -337,7 +332,6 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
String badIntegerPolicy =
Files.readString(Paths.get(POLICY_COMPLIANT_VCPE_BAD_INTEGER_JSON), StandardCharsets.UTF_8);
ToscaPolicy toscaPolicyRestartBad = new StandardCoder().decode(badIntegerPolicy, ToscaPolicy.class);
- update.setPolicies(List.of());
update.setPoliciesToBeUndeployed(List.of(toscaPolicyRestartV2.getIdentifier(),
toscaPolicyFirewall.getIdentifier()));
update.setPoliciesToBeDeployed(List.of(toscaPolicyRestartBad));
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 f4772eb9..9c4c8ab5 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
@@ -238,7 +238,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
update.setPdpGroup(null);
update.setPdpSubgroup(null);
update.setPoliciesToBeUndeployed(List.of(toscaPolicy2.getIdentifier()));
- update.setPolicies(List.of());
+ update.setPoliciesToBeDeployed(List.of());
assertTrue(fsm.update(update));
assertEquals(3, fsm.policyTypesMap.size());
assertEquals(0, fsm.policiesMap.size());
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java
index 7c94e52c..e17f43a2 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2021 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -141,7 +142,7 @@ public class LifecycleStateTerminatedTest {
update.setName(NetworkUtil.getHostname());
update.setPdpGroup("A");
update.setPdpSubgroup("a");
- update.setPolicies(Collections.emptyList());
+ update.setPoliciesToBeDeployed(Collections.emptyList());
update.setPdpHeartbeatIntervalMs(4 * 600000L);
assertFalse(fsm.update(update));