aboutsummaryrefslogtreecommitdiffstats
path: root/message-bus/src/test/resources
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2024-09-23 15:13:36 +0100
committeradheli.tavares <adheli.tavares@est.tech>2024-11-01 10:36:08 +0000
commitac4b5296ab01fc25d89cc4fc89b6407fb7254f1b (patch)
tree4fd2fe6f3b611dbdba48d6f4947bfb716eb08dc5 /message-bus/src/test/resources
parentf8ff4184fe5cc5d5a84c266d50e63c289729ef2f (diff)
Moving message bus configurations to its own module
Issue-ID: POLICY-5131 Change-Id: Ibbcdc487300767e7b10d69e9b388c50f09e1adbc Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'message-bus/src/test/resources')
-rw-r--r--message-bus/src/test/resources/META-INF/services/org.onap.policy.common.message.bus.features.NetLoggerFeatureApi1
-rw-r--r--message-bus/src/test/resources/logback-test.xml42
-rw-r--r--message-bus/src/test/resources/org/onap/policy/common/message/bus/event/TopicEndpointProxyTest.json30
-rw-r--r--message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/BusTopicBaseTest.json14
-rw-r--r--message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/InlineBusTopicSinkTest.json15
-rw-r--r--message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/SingleThreadedBusTopicSourceTest.json18
-rw-r--r--message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/TopicBaseTest.json9
-rw-r--r--message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_all_params.json62
-rw-r--r--message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_invalid.json6
-rw-r--r--message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_missing_mandatory.json12
-rw-r--r--message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_valid.json30
11 files changed, 239 insertions, 0 deletions
diff --git a/message-bus/src/test/resources/META-INF/services/org.onap.policy.common.message.bus.features.NetLoggerFeatureApi b/message-bus/src/test/resources/META-INF/services/org.onap.policy.common.message.bus.features.NetLoggerFeatureApi
new file mode 100644
index 00000000..7889cb8f
--- /dev/null
+++ b/message-bus/src/test/resources/META-INF/services/org.onap.policy.common.message.bus.features.NetLoggerFeatureApi
@@ -0,0 +1 @@
+org.onap.policy.common.message.bus.utils.NetLoggerUtilTest$NetLoggerFeature \ No newline at end of file
diff --git a/message-bus/src/test/resources/logback-test.xml b/message-bus/src/test/resources/logback-test.xml
new file mode 100644
index 00000000..ddf4f8bb
--- /dev/null
+++ b/message-bus/src/test/resources/logback-test.xml
@@ -0,0 +1,42 @@
+<!--
+ ============LICENSE_START=======================================================
+ ONAP
+ ================================================================================
+ 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.
+ ============LICENSE_END=========================================================
+ -->
+<configuration>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <Pattern>
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}.%M\(%line\) - %msg%n
+ </Pattern>
+ </encoder>
+ </appender>
+
+ <appender name="testAppender" class="org.onap.policy.common.message.bus.utils.NetLoggerUtilTest$TestAppender"/>
+
+ <logger name="org.onap.policy.drools.http.server.test" level="INFO"/>
+
+ <logger name="network" level="INFO">
+ <appender-ref ref="testAppender"/>
+ </logger>
+
+ <root level="WARN">
+ <appender-ref ref="STDOUT"/>
+ </root>
+
+</configuration> \ No newline at end of file
diff --git a/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/TopicEndpointProxyTest.json b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/TopicEndpointProxyTest.json
new file mode 100644
index 00000000..5b2e712a
--- /dev/null
+++ b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/TopicEndpointProxyTest.json
@@ -0,0 +1,30 @@
+{
+ "locked": false,
+ "alive": false,
+ "topicSources": [
+ {
+ "servers": [
+ "my-server"
+ ],
+ "topic": "noop-source",
+ "effectiveTopic": "noop-source",
+ "recentEvents": [],
+ "alive": false,
+ "locked": false,
+ "topicCommInfrastructure": "NOOP"
+ }
+ ],
+ "topicSinks": [
+ {
+ "servers": [
+ "my-server"
+ ],
+ "topic": "noop-sink",
+ "effectiveTopic": "noop-sink",
+ "recentEvents": [],
+ "alive": false,
+ "locked": false,
+ "topicCommInfrastructure": "NOOP"
+ }
+ ]
+}
diff --git a/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/BusTopicBaseTest.json b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/BusTopicBaseTest.json
new file mode 100644
index 00000000..462278a4
--- /dev/null
+++ b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/BusTopicBaseTest.json
@@ -0,0 +1,14 @@
+{
+ "servers" : [ "svra", "svrb" ],
+ "topic" : "my-topic",
+ "effectiveTopic" : "my-effective-topic",
+ "recentEvents" : [ ],
+ "alive" : false,
+ "locked" : false,
+ "apiKey" : "my-api-key",
+ "apiSecret" : "my-api-secret",
+ "useHttps" : true,
+ "allowTracing": true,
+ "allowSelfSignedCerts" : true,
+ "topicCommInfrastructure" : "NOOP"
+}
diff --git a/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/InlineBusTopicSinkTest.json b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/InlineBusTopicSinkTest.json
new file mode 100644
index 00000000..1f2fb55f
--- /dev/null
+++ b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/InlineBusTopicSinkTest.json
@@ -0,0 +1,15 @@
+{
+ "servers" : [ "svra", "svrb" ],
+ "topic" : "my-topic",
+ "effectiveTopic" : "my-effective-topic",
+ "recentEvents" : [ ],
+ "alive" : false,
+ "locked" : false,
+ "apiKey" : "my-api-key",
+ "apiSecret" : "my-api-secret",
+ "useHttps" : true,
+ "allowTracing": true,
+ "allowSelfSignedCerts" : true,
+ "topicCommInfrastructure" : "NOOP",
+ "partitionKey" : "my-partition"
+}
diff --git a/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/SingleThreadedBusTopicSourceTest.json b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/SingleThreadedBusTopicSourceTest.json
new file mode 100644
index 00000000..305620c8
--- /dev/null
+++ b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/SingleThreadedBusTopicSourceTest.json
@@ -0,0 +1,18 @@
+{
+ "servers" : [ "svra", "svrb" ],
+ "topic" : "my-topic",
+ "effectiveTopic" : "my-effective-topic",
+ "recentEvents" : [ ],
+ "alive" : false,
+ "locked" : false,
+ "apiKey" : "my-api-key",
+ "apiSecret" : "my-api-secret",
+ "useHttps" : true,
+ "allowTracing": true,
+ "allowSelfSignedCerts" : true,
+ "consumerGroup" : "my-cons-group",
+ "consumerInstance" : "my-cons-inst",
+ "fetchTimeout" : 101,
+ "fetchLimit" : 100,
+ "topicCommInfrastructure" : "NOOP"
+}
diff --git a/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/TopicBaseTest.json b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/TopicBaseTest.json
new file mode 100644
index 00000000..b72b4efd
--- /dev/null
+++ b/message-bus/src/test/resources/org/onap/policy/common/message/bus/event/base/TopicBaseTest.json
@@ -0,0 +1,9 @@
+{
+ "servers" : [ "svra", "svrb" ],
+ "topic" : "my-topic",
+ "effectiveTopic" : "my-topic",
+ "recentEvents" : [ ],
+ "alive" : false,
+ "locked" : false,
+ "topicCommInfrastructure" : "NOOP"
+}
diff --git a/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_all_params.json b/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_all_params.json
new file mode 100644
index 00000000..89e464dd
--- /dev/null
+++ b/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_all_params.json
@@ -0,0 +1,62 @@
+{
+ "topicSources" : [ {
+ "topic" : "policy-pdp-pap1",
+ "servers" : [ "kafka2, kafka3" ],
+ "topicCommInfrastructure" : "kafka",
+ "effectiveTopic" : "my-effective-topic",
+ "apiKey" : "my-api-key",
+ "apiSecret" : "my-api-secret",
+ "port": 123,
+ "useHttps" : true,
+ "allowTracing": true,
+ "allowSelfSignedCerts" : true,
+ "consumerGroup" : "consumer group",
+ "consumerInstance" : "consumer instance",
+ "fetchTimeout" : 15000,
+ "fetchLimit" : 100,
+ "userName": "username",
+ "password": "password",
+ "managed": true,
+ "environment": "environment1",
+ "aftEnvironment": "aftEnvironment1",
+ "partner": "partner1",
+ "latitude": "1234",
+ "longitude": "1234",
+ "partitionId": "partition_id",
+ "additionalProps": {"xyz":"xyz"},
+ "clientName": "clientName1",
+ "hostname": "hostname1",
+ "basePath": "basePath1",
+ "serializationProvider": "serializationProvider1"
+ }],
+ "topicSinks" : [ {
+ "topic" : "policy-pdp-pap1",
+ "servers" : [ "kafka2, kafka3" ],
+ "topicCommInfrastructure" : "kafka",
+ "effectiveTopic" : "my-effective-topic",
+ "apiKey" : "my-api-key",
+ "apiSecret" : "my-api-secret",
+ "port": 123,
+ "useHttps" : true,
+ "allowTracing": true,
+ "allowSelfSignedCerts" : true,
+ "consumerGroup" : "consumer group",
+ "consumerInstance" : "consumer instance",
+ "fetchTimeout" : 15000,
+ "fetchLimit" : 100,
+ "userName": "username",
+ "password": "password",
+ "managed": true,
+ "environment": "environment1",
+ "aftEnvironment": "aftEnvironment1",
+ "partner": "partner1",
+ "latitude": "1234",
+ "longitude": "1234",
+ "partitionId": "partition_id",
+ "additionalProps": {"xyz":"xyz"},
+ "clientName": "clientName1",
+ "hostname": "hostname1",
+ "basePath": "basePath1",
+ "serializationProvider": "serializationProvider1"
+ }]
+} \ No newline at end of file
diff --git a/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_invalid.json b/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_invalid.json
new file mode 100644
index 00000000..775b4886
--- /dev/null
+++ b/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_invalid.json
@@ -0,0 +1,6 @@
+{
+ "topicSources" : [{
+ "topic" : "ueb-source",
+ "servers" : ["my-server"]
+ }]
+} \ No newline at end of file
diff --git a/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_missing_mandatory.json b/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_missing_mandatory.json
new file mode 100644
index 00000000..216c11ec
--- /dev/null
+++ b/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_missing_mandatory.json
@@ -0,0 +1,12 @@
+{
+ "topicSources" : [ {
+ "topic" : "policy-pdp-pap1",
+ "servers" : [],
+ "topicCommInfrastructure" : "kafka"
+ }],
+ "topicSinks" : [ {
+ "topic" : "policy-pdp-pap2",
+ "servers" : [ "kafka1, kafka2" ],
+ "topicCommInfrastructure" : "kafka"
+ }]
+} \ No newline at end of file
diff --git a/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_valid.json b/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_valid.json
new file mode 100644
index 00000000..2603bfdc
--- /dev/null
+++ b/message-bus/src/test/resources/org/onap/policy/common/message/bus/parameters/TopicParameters_valid.json
@@ -0,0 +1,30 @@
+{
+ "topicSources" : [ {
+ "topic" : "ueb-source",
+ "servers" : [ "my-server" ],
+ "topicCommInfrastructure" : "ueb"
+ },{
+ "topic" : "policy-pdp-pap1",
+ "servers" : [ "kafka1, kafka2" ],
+ "topicCommInfrastructure" : "kafka"
+ },{
+ "topic" : "policy-pdp-pap2",
+ "servers" : [ "kafka2, kafka3" ],
+ "topicCommInfrastructure" : "kafka"
+ }],
+ "topicSinks" : [ {
+ "topic" : "ueb-sink",
+ "servers" : [ "my-server" ],
+ "topicCommInfrastructure" : "ueb"
+ },{
+ "topic" : "policy-pdp-pap2",
+ "servers" : [ "kafka1, kafka2" ],
+ "topicCommInfrastructure" : "kafka"
+ },{
+ "topic" : "policy-pdp-pap3",
+ "servers" : [ "kafka2, kafka3" ],
+ "topicCommInfrastructure" : "kafka",
+ "effectiveTopic":"effectiveTopic1",
+ "allowSelfSignedCerts":true
+ }]
+} \ No newline at end of file