summaryrefslogtreecommitdiffstats
path: root/models-tosca/src/test/java
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-12-10 13:47:55 -0500
committerPamela Dragosh <pdragosh@research.att.com>2019-12-10 14:32:34 -0500
commitbc9f1dbb684b5acb28dbbd24c9a11ac2a3f7b3e8 (patch)
treeec64c9e0b8b69d07241c8b07fda3922d10391098 /models-tosca/src/test/java
parentec0a2e532b018f8511de2b492f9fab10b0013805 (diff)
Update optimization policies
These policies need to be updated. Issue-ID: POLICY-2066 Change-Id: Idc15aa36f4295477b37aa6398920853436909751 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'models-tosca/src/test/java')
-rw-r--r--models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java
index 2c62e7fc0..34feece66 100644
--- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java
+++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/concepts/ToscaPolicyFilterTest.java
@@ -144,26 +144,26 @@ public class ToscaPolicyFilterTest {
ToscaPolicyFilter filter = ToscaPolicyFilter.builder().version(ToscaPolicyFilter.LATEST_VERSION).build();
List<ToscaPolicy> filteredList = filter.filter(policyList);
- assertEquals(15, filteredList.size());
+ assertEquals(22, filteredList.size());
assertEquals(VERSION_100, filteredList.get(7).getVersion());
assertEquals(VERSION_100, filteredList.get(12).getVersion());
- assertEquals(17, policyList.size());
- assertEquals(15, filteredList.size());
+ assertEquals(24, policyList.size());
+ assertEquals(22, filteredList.size());
policyList.get(10).setVersion("2.0.0");
policyList.get(16).setVersion("3.4.5");
filteredList = filter.filter(policyList);
- assertEquals(15, filteredList.size());
- assertEquals("2.0.0", filteredList.get(7).getVersion());
- assertEquals("3.4.5", filteredList.get(12).getVersion());
+ assertEquals(22, filteredList.size());
+ assertEquals("2.0.0", filteredList.get(12).getVersion());
+ assertEquals("3.4.5", filteredList.get(14).getVersion());
policyList.get(10).setVersion(VERSION_100);
policyList.get(16).setVersion(VERSION_100);
filteredList = filter.filter(policyList);
- assertEquals(15, filteredList.size());
- assertEquals(VERSION_100, filteredList.get(7).getVersion());
+ assertEquals(22, filteredList.size());
assertEquals(VERSION_100, filteredList.get(12).getVersion());
+ assertEquals(VERSION_100, filteredList.get(14).getVersion());
}
@Test
@@ -182,7 +182,7 @@ public class ToscaPolicyFilterTest {
filter = ToscaPolicyFilter.builder().version(VERSION_100).build();
filteredList = filter.filter(policyList);
- assertEquals(15, filteredList.size());
+ assertEquals(21, filteredList.size());
filter = ToscaPolicyFilter.builder().name("OSDF_CASABLANCA.SubscriberPolicy_v1").version(VERSION_100).build();
filteredList = filter.filter(policyList);
@@ -190,7 +190,7 @@ public class ToscaPolicyFilterTest {
filter = ToscaPolicyFilter.builder().name("operational.modifyconfig").version(VERSION_100).build();
filteredList = filter.filter(policyList);
- assertEquals(2, filteredList.size());
+ assertEquals(1, filteredList.size());
}
@Test
@@ -198,11 +198,11 @@ public class ToscaPolicyFilterTest {
// null pattern
ToscaPolicyFilter filter = ToscaPolicyFilter.builder().versionPrefix(null).build();
List<ToscaPolicy> filteredList = filter.filter(policyList);
- assertEquals(17, filteredList.size());
+ assertEquals(24, filteredList.size());
filter = ToscaPolicyFilter.builder().versionPrefix("1.").build();
filteredList = filter.filter(policyList);
- assertEquals(14, filteredList.size());
+ assertEquals(21, filteredList.size());
filter = ToscaPolicyFilter.builder().versionPrefix("100.").build();
filteredList = filter.filter(policyList);
@@ -229,12 +229,12 @@ public class ToscaPolicyFilterTest {
filter = ToscaPolicyFilter.builder().typeVersion(VERSION_000).build();
filteredList = filter.filter(policyList);
- assertEquals(14, filteredList.size());
+ assertEquals(7, filteredList.size());
- filter = ToscaPolicyFilter.builder().type("onap.policies.optimization.HpaPolicy").typeVersion(VERSION_000)
- .build();
+ filter = ToscaPolicyFilter.builder().type("onap.policies.optimization.resource.HpaPolicy")
+ .typeVersion(VERSION_100).build();
filteredList = filter.filter(policyList);
- assertEquals(1, filteredList.size());
+ assertEquals(2, filteredList.size());
filter = ToscaPolicyFilter.builder().type("onap.policies.controlloop.Operational").typeVersion(VERSION_000)
.build();