Remove policies field references from tests 93/121593/1
authorwaynedunican <wayne.dunican@est.tech>
Mon, 31 May 2021 10:21:07 +0000 (11:21 +0100)
committerWayneDunican <wayne.dunican@est.tech>
Mon, 31 May 2021 10:33:04 +0000 (11:33 +0100)
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>
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmUpdateTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateTerminatedTest.java

index 74d2089..1927c51 100644 (file)
@@ -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;
index bd6b392..2efaa49 100644 (file)
@@ -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));
index f4772eb..9c4c8ab 100644 (file)
@@ -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());
index 7c94e52..e17f43a 100644 (file)
@@ -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));