diff options
author | ramverma <ram.krishna.verma@est.tech> | 2020-01-10 10:46:40 +0000 |
---|---|---|
committer | ramverma <ram.krishna.verma@est.tech> | 2020-01-10 13:47:51 +0000 |
commit | 3f8536f2a89f9e34f5705def915d7ecfe3bfa5bd (patch) | |
tree | c4c2145877dcfa603438774975cb3435ab274ef6 /models-pdp/src/test/java/org | |
parent | a3771d2efbf906cc4bf58683d4b2f40637d63ced (diff) |
Remove supportedPolicyTypes from PdpStatus
Removing supportedPolicyTypes from PdpStatus in policy/models as it is
no longer expected from the Pdps to send it as part of the heartbeat or
initial registration message. Instead the PdpGroupName is expected from
the Pdps in the initial registration message.
Issue-ID: POLICY-2256
Change-Id: I14b76a737027e146d69d89c2fe2c3f098a89e196
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
Diffstat (limited to 'models-pdp/src/test/java/org')
-rw-r--r-- | models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatusTest.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatusTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatusTest.java index 3284d95ff..68af3d3b7 100644 --- a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatusTest.java +++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatusTest.java @@ -1,8 +1,9 @@ -/* +/*- * ============LICENSE_START======================================================= * ONAP Policy Models * ================================================================================ * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,11 +27,11 @@ import static org.onap.policy.models.pdp.concepts.PdpMessageUtils.removeVariable import java.util.Arrays; import java.util.Collections; + import org.junit.Test; import org.onap.policy.models.pdp.enums.PdpHealthStatus; import org.onap.policy.models.pdp.enums.PdpState; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier; public class PdpStatusTest { @@ -38,10 +39,9 @@ public class PdpStatusTest { public void testCopyConstructor() { assertThatThrownBy(() -> new PdpStatus(null)).isInstanceOf(NullPointerException.class); - PdpStatus orig = new PdpStatus(); + final PdpStatus orig = new PdpStatus(); // verify with null values - orig.setSupportedPolicyTypes(Collections.emptyList()); orig.setPolicies(Collections.emptyList()); assertEquals(removeVariableFields(orig.toString()), removeVariableFields(new PdpStatus(orig).toString())); @@ -56,17 +56,16 @@ public class PdpStatusTest { orig.setPolicies(Arrays.asList(new ToscaPolicyIdentifier("policy-A", "1.0.0"))); orig.setProperties("my-properties"); - PdpResponseDetails resp = new PdpResponseDetails(); + final PdpResponseDetails resp = new PdpResponseDetails(); resp.setResponseMessage("my-response"); orig.setResponse(resp); orig.setState(PdpState.SAFE); - PdpStatistics stats = new PdpStatistics(); + final PdpStatistics stats = new PdpStatistics(); stats.setPdpInstanceId("my-pdp-id"); orig.setStatistics(stats); - orig.setSupportedPolicyTypes(Arrays.asList(new ToscaPolicyTypeIdentifier("type-A", "2.0.0"))); assertEquals(removeVariableFields(orig.toString()), removeVariableFields(new PdpStatus(orig).toString())); } |