aboutsummaryrefslogtreecommitdiffstats
path: root/policy-utils/src/test/java/org/onap
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-08-01 14:00:57 +0100
committeradheli.tavares <adheli.tavares@est.tech>2024-08-01 14:03:21 +0100
commitf6d8e60eb75733cf9996bffb3c6ecb586f377da6 (patch)
treedd5c096965bd37d2914ab0e17dd511bd5029ac00 /policy-utils/src/test/java/org/onap
parent4ec22933a69bcf5d2031d3c76fb32d1c50e0d7e1 (diff)
Fix Drools-Apps executing policies
- hibernate dependencies were causing conflicts; updated to latest hibernate-core with all the required deps. - adjusted some variables to be correctly read by properties parser. - added STDOUT option to logback.xml to be able to get logs from controllers/features when using docker logs command. Issue-ID: POLICY-4955 Change-Id: Id3475fc77a63c46697c437bd413ebc1f97b731af Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'policy-utils/src/test/java/org/onap')
-rw-r--r--policy-utils/src/test/java/org/onap/policy/drools/policies/DomainMakerTest.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/policy-utils/src/test/java/org/onap/policy/drools/policies/DomainMakerTest.java b/policy-utils/src/test/java/org/onap/policy/drools/policies/DomainMakerTest.java
index ee32cb2b..f8ffa503 100644
--- a/policy-utils/src/test/java/org/onap/policy/drools/policies/DomainMakerTest.java
+++ b/policy-utils/src/test/java/org/onap/policy/drools/policies/DomainMakerTest.java
@@ -71,6 +71,9 @@ class DomainMakerTest {
policy.setType("policy.type.Z");
assertFalse(domainMaker.isConformant(policy));
+
+ assertThatThrownBy(() -> domainMaker.isConformant(null))
+ .hasMessageContaining("policy is marked non-null but is null");
}
@Test
@@ -108,6 +111,12 @@ class DomainMakerTest {
domainAPolicy.getProperties().getNested().setNested1("");
ToscaConceptIdentifier ident1 = policy1.getTypeIdentifier();
assertFalse(domainMaker.conformance(ident1, domainAPolicy));
+
+ var policy2 = getToscaPolicy("src/test/resources/policyA.json");
+ policy2.setType("not.registered.type");
+ policy2.setTypeVersion("4.2.5");
+ assertFalse(domainMaker.conformance(policy2));
+ assertFalse(domainMaker.conformance(policy2.getTypeIdentifier(), domainAPolicy));
}
@Test
@@ -125,6 +134,8 @@ class DomainMakerTest {
policy.setTypeVersion("1.0.0");
assertFalse(domainMaker.isConformant(policy));
+
+ assertFalse(domainMaker.registerValidator(policy.getTypeIdentifier(), "$schema"));
}
@Test