aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/resources')
-rw-r--r--src/test/resources/application.properties2
-rw-r--r--src/test/resources/certificates/client.p12bin0 -> 2685 bytes
-rw-r--r--src/test/resources/certificates/client.pass1
-rw-r--r--src/test/resources/certificates/client_invalid.pass1
-rw-r--r--src/test/resources/certificates/truststorebin0 -> 1455 bytes
-rw-r--r--src/test/resources/certificates/truststore.pass1
-rw-r--r--src/test/resources/certificates/truststore_invalid.pass1
-rw-r--r--src/test/resources/logback-test.xml55
-rw-r--r--src/test/resources/org/onap/pnfsimulator/simulator/filesystem/test1.json12
-rw-r--r--src/test/resources/org/onap/pnfsimulator/simulator/invalidJsonStructureEvent.json1
-rw-r--r--src/test/resources/org/onap/pnfsimulator/simulator/validExampleMeasurementEvent.json86
11 files changed, 160 insertions, 0 deletions
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties
new file mode 100644
index 0000000..6815680
--- /dev/null
+++ b/src/test/resources/application.properties
@@ -0,0 +1,2 @@
+templates.dir=src/test/resources/org/onap/pnfsimulator/simulator
+ssl.clientCertificateEnabled=false
diff --git a/src/test/resources/certificates/client.p12 b/src/test/resources/certificates/client.p12
new file mode 100644
index 0000000..0bbec38
--- /dev/null
+++ b/src/test/resources/certificates/client.p12
Binary files differ
diff --git a/src/test/resources/certificates/client.pass b/src/test/resources/certificates/client.pass
new file mode 100644
index 0000000..25acfbf
--- /dev/null
+++ b/src/test/resources/certificates/client.pass
@@ -0,0 +1 @@
+collector \ No newline at end of file
diff --git a/src/test/resources/certificates/client_invalid.pass b/src/test/resources/certificates/client_invalid.pass
new file mode 100644
index 0000000..0b54957
--- /dev/null
+++ b/src/test/resources/certificates/client_invalid.pass
@@ -0,0 +1 @@
+invalidpassword \ No newline at end of file
diff --git a/src/test/resources/certificates/truststore b/src/test/resources/certificates/truststore
new file mode 100644
index 0000000..e90b710
--- /dev/null
+++ b/src/test/resources/certificates/truststore
Binary files differ
diff --git a/src/test/resources/certificates/truststore.pass b/src/test/resources/certificates/truststore.pass
new file mode 100644
index 0000000..25acfbf
--- /dev/null
+++ b/src/test/resources/certificates/truststore.pass
@@ -0,0 +1 @@
+collector \ No newline at end of file
diff --git a/src/test/resources/certificates/truststore_invalid.pass b/src/test/resources/certificates/truststore_invalid.pass
new file mode 100644
index 0000000..0b54957
--- /dev/null
+++ b/src/test/resources/certificates/truststore_invalid.pass
@@ -0,0 +1 @@
+invalidpassword \ No newline at end of file
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
new file mode 100644
index 0000000..0dedeba
--- /dev/null
+++ b/src/test/resources/logback-test.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Simulator
+ ================================================================================
+ Copyright (C) 2019 Nokia. All rights reserved.
+ ================================================================================
+ 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 complete="true" compact="true">
+
+ <Property name="outputFilename" value="pnfsimulator_output"/>
+ <Property name="log-path" value="${java.io.tmpdir}"/>
+ <property name="maxFileSize" value="50MB"/>
+ <property name="maxHistory" value="30"/>
+ <property name="totalSizeCap" value="10GB"/>
+ <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
+
+
+ <appender name="Console" target="SYSTEM_OUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
+ </encoder>
+ </appender>
+
+ <appender name="ROLLING-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <encoder>
+ <pattern>${FILE_LOG_PATTERN}</pattern>
+ </encoder>
+ <File>${log-path}/${outputFilename}.log</File>
+ <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <FileNamePattern>${log-path}/${outputFilename}.%d{yyyy-MM-dd}.%i.log.zip</FileNamePattern>
+ <MaxFileSize>${maxFileSize}</MaxFileSize>
+ <MaxHistory>${maxHistory}</MaxHistory>
+ <TotalSizeCap>${totalSizeCap}</TotalSizeCap>
+ </rollingPolicy>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="Console" />
+ <appender-ref ref="ROLLING-FILE" />
+ </root>
+</Configuration>
diff --git a/src/test/resources/org/onap/pnfsimulator/simulator/filesystem/test1.json b/src/test/resources/org/onap/pnfsimulator/simulator/filesystem/test1.json
new file mode 100644
index 0000000..89e4a76
--- /dev/null
+++ b/src/test/resources/org/onap/pnfsimulator/simulator/filesystem/test1.json
@@ -0,0 +1,12 @@
+{
+ "field1": "value1",
+ "field2": 2,
+ "nested": {
+ "key1": [
+ 1,
+ 2,
+ 3
+ ],
+ "key2": "sampleValue2"
+ }
+}
diff --git a/src/test/resources/org/onap/pnfsimulator/simulator/invalidJsonStructureEvent.json b/src/test/resources/org/onap/pnfsimulator/simulator/invalidJsonStructureEvent.json
new file mode 100644
index 0000000..4d6ef7d
--- /dev/null
+++ b/src/test/resources/org/onap/pnfsimulator/simulator/invalidJsonStructureEvent.json
@@ -0,0 +1 @@
+{"sampleKey1": [{"sampleKey2": "1"}, {"sampleKey2": "2"}]
diff --git a/src/test/resources/org/onap/pnfsimulator/simulator/validExampleMeasurementEvent.json b/src/test/resources/org/onap/pnfsimulator/simulator/validExampleMeasurementEvent.json
new file mode 100644
index 0000000..a240b93
--- /dev/null
+++ b/src/test/resources/org/onap/pnfsimulator/simulator/validExampleMeasurementEvent.json
@@ -0,0 +1,86 @@
+{
+ "event": {
+ "commonEventHeader": {
+ "domain": "measurementsForVfScaling",
+ "eventName": "vFirewallBroadcastPackets",
+ "eventId": "4cfc-91cf-31a46",
+ "nfType": "mrfx",
+ "priority": "Normal",
+ "reportingEntityName": "#dn",
+ "sequence": 1,
+ "sourceName": "ClosedLoopVNF",
+ "startEpochMicrosec": 1531616794,
+ "lastEpochMicrosec": 1531719042,
+ "version": 2.0
+ },
+ "measurementsForVfScalingFields": {
+ "measurementsForVfSclaingFieldsVersion": 2.0,
+ "measurementsForVfScalingVersion": 2.0,
+ "measurementInterval": 180,
+ "concurrentSessions": 2,
+ "cpuUsageArray": [
+ {
+ "cpuIdentifier": "INTEL_CORE_I7_1",
+ "percentUsage": 50
+ },
+ {
+ "cpuIdentifier": "INTEL_CORE_I7_2",
+ "percentUsage": 70
+ }
+ ],
+ "memoryUsageArray": [
+ {
+ "vmIdentifier": "vmIdentifier",
+ "memoryFree": 50,
+ "memoryUsed": 10
+ }
+ ],
+ "vNicUsageArray": [
+ {
+ "receivedTotalPacketsDelta": 30
+ }
+ ],
+ "numberOfMediaPortsInUse": 100,
+ "additionalMeasurements": [
+ {
+ "name": "licenseUsage",
+ "arrayOfFields": [
+ "#measurement",
+ {
+ "name": "G729AudioPort",
+ "value": "1"
+ },
+ {
+ "name": "G722AudioPort",
+ "value": "1"
+ },
+ {
+ "name": "AMRAudioPort",
+ "value": "4"
+ },
+ {
+ "name": "AMRWBAudioPort",
+ "value": "5"
+ },
+ {
+ "name": "OpusAudioPort",
+ "value": "6"
+ },
+ {
+ "name": "H263VideoPort",
+ "value": "7"
+ },
+ {
+ "name": "H264NonHCVideoPort",
+ "value": "8"
+ },
+ {
+ "name": "H264HCVideoPort",
+ "value": "9"
+ }
+ ]
+ }
+ ]
+ }
+ }
+}