aboutsummaryrefslogtreecommitdiffstats
path: root/policy-domains
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-domains
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-domains')
-rw-r--r--policy-domains/src/test/java/org/onap/policy/drools/domain/models/controller/ControllerTopicTest.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/policy-domains/src/test/java/org/onap/policy/drools/domain/models/controller/ControllerTopicTest.java b/policy-domains/src/test/java/org/onap/policy/drools/domain/models/controller/ControllerTopicTest.java
new file mode 100644
index 00000000..aae1aec4
--- /dev/null
+++ b/policy-domains/src/test/java/org/onap/policy/drools/domain/models/controller/ControllerTopicTest.java
@@ -0,0 +1,45 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2024 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.drools.domain.models.controller;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+class ControllerTopicTest {
+
+ @Test
+ void testSinkTopic() {
+ var topic = new ControllerSinkTopic(ControllerSinkTopic.builder()
+ .topicName("SINK_TOPIC_NAME"));
+ Assertions.assertEquals("sink_topic_name", topic.getTopicName());
+ topic.setTopicName("NEW_TOPIC_NAME");
+ Assertions.assertEquals("new_topic_name", topic.getTopicName());
+ }
+
+ @Test
+ void testSourceTopic() {
+ var topic = new ControllerSourceTopic(ControllerSourceTopic.builder()
+ .topicName("SOURCE_TOPIC_NAME"));
+ Assertions.assertEquals("source_topic_name", topic.getTopicName());
+ topic.setTopicName("NEW_TOPIC_NAME");
+ Assertions.assertEquals("new_topic_name", topic.getTopicName());
+ }
+}