diff options
author | liamfallon <liam.fallon@est.tech> | 2019-04-17 13:58:26 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-04-17 13:58:26 +0000 |
commit | 900920306a0be309f389880325558bb96ff76356 (patch) | |
tree | e0570422d911b55cd5a6c61e0a4f16f8869b0586 /models-sim/models-sim-dmaap/src/test/resources | |
parent | 70be3b7d76f6bd8d2c834496c688d349933e7130 (diff) |
Add DMaaP simulator for CSIT testing
A rudimentary DMaaP simulator that simply holds requests and responds
to all readers with whatever message comes in on a topic. The simulator
is placed in policy models for now but should be submitted to DMaaP.
The simulator is now working but is still extremely rough.
Issue-ID: POLICY-1643
Change-Id: I28645a73cf198fe825c897243b30cd34dc29f20d
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-sim/models-sim-dmaap/src/test/resources')
7 files changed, 83 insertions, 0 deletions
diff --git a/models-sim/models-sim-dmaap/src/test/resources/logback-test.xml b/models-sim/models-sim-dmaap/src/test/resources/logback-test.xml new file mode 100644 index 000000000..de7ef98da --- /dev/null +++ b/models-sim/models-sim-dmaap/src/test/resources/logback-test.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + Copyright (C) 2019 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========================================================= +--> + +<configuration> + + <contextName>DMaaPSim</contextName> + <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> + <property name="LOG_DIR" value="${java.io.tmpdir}/pf_logging/" /> + + <!-- USE FOR STD OUT ONLY --> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <encoder> + <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern> + </encoder> + </appender> + + <root level="info"> + <appender-ref ref="STDOUT" /> + </root> + + <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${LOG_DIR}/apex.log</file> + <encoder> + <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level + %logger{26} - %msg %n %ex{full}</pattern> + </encoder> + </appender> + + <logger name="org.eclipse.jetty" level="info" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> + + <logger name="org.onap.policy.models.sim.dmaap" level="trace" additivity="false"> + <appender-ref ref="STDOUT" /> + </logger> +</configuration> diff --git a/models-sim/models-sim-dmaap/src/test/resources/parameters/EmptyParameters.json b/models-sim/models-sim-dmaap/src/test/resources/parameters/EmptyParameters.json new file mode 100644 index 000000000..0637a088a --- /dev/null +++ b/models-sim/models-sim-dmaap/src/test/resources/parameters/EmptyParameters.json @@ -0,0 +1 @@ +[]
\ No newline at end of file diff --git a/models-sim/models-sim-dmaap/src/test/resources/parameters/InvalidParameters.json b/models-sim/models-sim-dmaap/src/test/resources/parameters/InvalidParameters.json new file mode 100644 index 000000000..de2040cc8 --- /dev/null +++ b/models-sim/models-sim-dmaap/src/test/resources/parameters/InvalidParameters.json @@ -0,0 +1,3 @@ +{ + "name" : [] +}
\ No newline at end of file diff --git a/models-sim/models-sim-dmaap/src/test/resources/parameters/MinimumParameters.json b/models-sim/models-sim-dmaap/src/test/resources/parameters/MinimumParameters.json new file mode 100644 index 000000000..aeedf9d6e --- /dev/null +++ b/models-sim/models-sim-dmaap/src/test/resources/parameters/MinimumParameters.json @@ -0,0 +1,7 @@ +{ + "name":"DMaapSim", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6845 + } +} diff --git a/models-sim/models-sim-dmaap/src/test/resources/parameters/NoParameters.json b/models-sim/models-sim-dmaap/src/test/resources/parameters/NoParameters.json new file mode 100644 index 000000000..7a73a41bf --- /dev/null +++ b/models-sim/models-sim-dmaap/src/test/resources/parameters/NoParameters.json @@ -0,0 +1,2 @@ +{ +}
\ No newline at end of file diff --git a/models-sim/models-sim-dmaap/src/test/resources/parameters/NormalParameters.json b/models-sim/models-sim-dmaap/src/test/resources/parameters/NormalParameters.json new file mode 100644 index 000000000..a2a036645 --- /dev/null +++ b/models-sim/models-sim-dmaap/src/test/resources/parameters/NormalParameters.json @@ -0,0 +1,7 @@ +{ + "name": "DMaapSim", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6845 + } +} diff --git a/models-sim/models-sim-dmaap/src/test/resources/parameters/Parameters_InvalidName.json b/models-sim/models-sim-dmaap/src/test/resources/parameters/Parameters_InvalidName.json new file mode 100644 index 000000000..fba033e52 --- /dev/null +++ b/models-sim/models-sim-dmaap/src/test/resources/parameters/Parameters_InvalidName.json @@ -0,0 +1,9 @@ +{ + "name":" ", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"dmaapsim", + "password":"zb!XztG34" + } +} |