diff options
Diffstat (limited to 'prh-app-server/src/test/resources')
19 files changed, 172 insertions, 182 deletions
diff --git a/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/logicalLinkBody.json b/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/logicalLinkBody.json new file mode 100644 index 00000000..c73b93e5 --- /dev/null +++ b/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/logicalLinkBody.json @@ -0,0 +1 @@ +{"link-name":"some-link","link-type":"attachment-point","relationship-list":{"relationship":[{"related-link":"/network/pnfs/pnf/Nokia123","relationship-data":[]}]}}
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/oldLogicalLink.json b/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/oldLogicalLink.json new file mode 100644 index 00000000..7d3f02df --- /dev/null +++ b/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/oldLogicalLink.json @@ -0,0 +1,21 @@ +{ + "link-name": "some-link", + "in-maint": false, + "link-type": "attachment-point", + "resource-version": "1560171816043", + "relationship-list": { + "relationship": [ + { + "related-to": "pnf", + "relationship-label": "org.onap.relationships.inventory.BridgedTo", + "related-link": "/aai/v14/network/pnfs/pnf/Nokia123", + "relationship-data": [ + { + "relationship-key": "pnf.pnf-name", + "relationship-value": "Nokia123" + } + ] + } + ] + } +}
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/pnfWithLogicalLink.json b/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/pnfWithLogicalLink.json new file mode 100644 index 00000000..6f4690d6 --- /dev/null +++ b/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/pnfWithLogicalLink.json @@ -0,0 +1,25 @@ +{ + "pnf-name": "Nokia123", + "pnf-name2-source": "", + "pnf-id": "Nokia123", + "equip-type": "", + "equip-vendor": "", + "management-option": "", + "in-maint": false, + "resource-version": "1560153116694", + "relationship-list": { + "relationship": [ + { + "related-to": "logical-link", + "relationship-label": "org.onap.relationships.inventory.BridgedTo", + "related-link": "/aai/v14/network/logical-links/logical-link/some-link", + "relationship-data": [ + { + "relationship-key": "logical-link.link-name", + "relationship-value": "some-link" + } + ] + } + ] + } +}
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/pnfWithoutLinks.json b/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/pnfWithoutLinks.json new file mode 100644 index 00000000..1f614d40 --- /dev/null +++ b/prh-app-server/src/test/resources/BbsActionsTaskTestFiles/pnfWithoutLinks.json @@ -0,0 +1,10 @@ +{ + "pnf-name": "Nokia123", + "pnf-name2-source": "", + "pnf-id": "Nokia123", + "equip-type": "", + "equip-vendor": "", + "management-option": "", + "in-maint": false, + "resource-version": "1560153116694" +} diff --git a/prh-app-server/src/test/resources/application.yaml b/prh-app-server/src/test/resources/application.yaml new file mode 100644 index 00000000..fa7f11cf --- /dev/null +++ b/prh-app-server/src/test/resources/application.yaml @@ -0,0 +1,8 @@ +spring: + profiles: + active: prod + +logging: + level: + org.onap.dcaegen2.services.prh: debug + org.onap.dcaegen2.services.sdk: debug
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/bootstrap.yaml b/prh-app-server/src/test/resources/bootstrap.yaml new file mode 100644 index 00000000..46796cdc --- /dev/null +++ b/prh-app-server/src/test/resources/bootstrap.yaml @@ -0,0 +1,6 @@ +cbs: + enabled: false +spring: + cloud: + config: + enabled: false
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/configurationFromCbs.json b/prh-app-server/src/test/resources/configurationFromCbs.json new file mode 100644 index 00000000..d76aab4f --- /dev/null +++ b/prh-app-server/src/test/resources/configurationFromCbs.json @@ -0,0 +1,54 @@ +{ + "config":{ + "dmaap.dmaapConsumerConfiguration.dmaapUserName":"admin", + "dmaap.dmaapConsumerConfiguration.dmaapUserPassword":"admin", + "dmaap.dmaapConsumerConfiguration.consumerId":"c12", + "dmaap.dmaapConsumerConfiguration.consumerGroup":"OpenDCAE-c12", + "dmaap.dmaapConsumerConfiguration.timeoutMs":-1, + + "dmaap.dmaapProducerConfiguration.dmaapUserName":"admin", + "dmaap.dmaapProducerConfiguration.dmaapUserPassword":"admin", + "dmaap.dmaapUpdateProducerConfiguration.dmaapUserName":"admin", + "dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword":"admin", + "aai.aaiClientConfiguration.pnfUrl": "https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf", + "aai.aaiClientConfiguration.aaiUserName":"AAI", + "aai.aaiClientConfiguration.aaiUserPassword":"AAI", + "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors":true, + "aai.aaiClientConfiguration.aaiServiceInstancePath":"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}", + "aai.aaiClientConfiguration.aaiHeaders":{ + "X-FromAppId":"prh", + "X-TransactionId":"9999", + "Accept":"application/json", + "Real-Time":"true", + "Authorization":"Basic QUFJOkFBSQ==" + }, + "security.trustStorePath":"/opt/app/prh/local/org.onap.prh.trust.jks", + "security.trustStorePasswordPath":"change_it", + "security.keyStorePath":"/opt/app/prh/local/org.onap.prh.p12", + "security.keyStorePasswordPath":"change_it", + "security.enableAaiCertAuth":false, + "security.enableDmaapCertAuth":false, + "streams_publishes":{ + "pnf-update":{ + "type": "message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:2222/events/unauthenticated.PNF_UPDATE" + } + }, + "pnf-ready":{ + "type": "message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:2222/events/unauthenticated.PNF_READY" + } + } + }, + "streams_subscribes":{ + "ves-reg-output":{ + "type": "message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT" + } + } + } + } +}
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/correct_config.json b/prh-app-server/src/test/resources/correct_config.json deleted file mode 100644 index 5c80bc99..00000000 --- a/prh-app-server/src/test/resources/correct_config.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "configs": { - "aai": { - "aaiClientConfiguration": { - "aaiHost": "localhost", - "aaiPort": 8080, - "aaiIgnoreSslCertificateErrors": true, - "aaiProtocol": "https", - "aaiUserName": "admin", - "aaiUserPassword": "admin", - "aaiBasePath": "/aai/v11", - "aaiPnfPath": "/network/pnfs/pnf", - "aaiHeaders": { - "X-FromAppId": "prh", - "X-TransactionId": "9999", - "Accept": "application/json", - "Real-Time": "true", - "Content-Type": "application/merge-patch+json", - "Authorization": "Basic QUFJOkFBSQ==" - } - } - }, - "dmaap": { - "dmaapConsumerConfiguration": { - "consumerGroup": "other", - "consumerId": "1", - "dmaapContentType": "application/json", - "dmaapHostName": "localhost", - "dmaapPortNumber": 2222, - "dmaapProtocol": "http", - "dmaapTopicName": "temp", - "dmaapUserName": "admin", - "dmaapUserPassword": "admin", - "messageLimit": 1000, - "timeoutMs": 1000 - }, - "dmaapProducerConfiguration": { - "dmaapContentType": "application/json", - "dmaapHostName": "localhost", - "dmaapPortNumber": 2223, - "dmaapProtocol": "http", - "dmaapTopicName": "temp", - "dmaapUserName": "admin", - "dmaapUserPassword": "admin" - } - }, - "security": { - "trustStorePath": "/opt/app/prh/local/org.onap.prh.trust.jks", - "trustStorePasswordPath": "change it", - "keyStorePath": "/opt/app/prh/local/org.onap.prh.p12", - "keyStorePasswordPath": "change it", - "enableAaiCertAuth": "false", - "enableDmaapCertAuth": "false" - } - } -}
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/flattened_configuration.json b/prh-app-server/src/test/resources/flattened_configuration.json deleted file mode 100644 index f8def2ef..00000000 --- a/prh-app-server/src/test/resources/flattened_configuration.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true, - "dmaap.dmaapProducerConfiguration.dmaapTopicName": "/events/unauthenticated.PNF_READY", - "dmaap.dmaapConsumerConfiguration.timeoutMs": -1, - "dmaap.dmaapConsumerConfiguration.dmaapHostName": "message-router.onap.svc.cluster.local", - "aai.aaiClientConfiguration.aaiPnfPath": "/network/pnfs/pnf", - "aai.aaiClientConfiguration.aaiUserPassword": "AAI", - "dmaap.dmaapConsumerConfiguration.dmaapUserName": "admin", - "aai.aaiClientConfiguration.aaiBasePath": "/aai/v12", - "dmaap.dmaapProducerConfiguration.dmaapPortNumber": 3904, - "aai.aaiClientConfiguration.aaiHost": "aai.onap.svc.cluster.local", - "dmaap.dmaapConsumerConfiguration.dmaapUserPassword": "admin", - "dmaap.dmaapProducerConfiguration.dmaapProtocol": "http", - "dmaap.dmaapProducerConfiguration.dmaapContentType": "application/json", - "dmaap.dmaapConsumerConfiguration.dmaapTopicName": "/events/unauthenticated.SEC_OTHER_OUTPUT", - "dmaap.dmaapConsumerConfiguration.dmaapPortNumber": 3904, - "dmaap.dmaapConsumerConfiguration.dmaapContentType": "application/json", - "dmaap.dmaapConsumerConfiguration.messageLimit": -1, - "dmaap.dmaapConsumerConfiguration.dmaapProtocol": "http", - "aai.aaiClientConfiguration.aaiUserName": "AAI", - "dmaap.dmaapConsumerConfiguration.consumerId": "c12", - "dmaap.dmaapProducerConfiguration.dmaapHostName": "message-router.onap.svc.cluster.local", - "aai.aaiClientConfiguration.aaiHostPortNumber": 8443, - "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDCAE-c12", - "aai.aaiClientConfiguration.aaiProtocol": "https", - "dmaap.dmaapProducerConfiguration.dmaapUserName": "admin", - "dmaap.dmaapProducerConfiguration.dmaapUserPassword": "admin", - "security.trustStorePath": "/opt/app/prh/local/org.onap.prh.trust.jks", - "security.trustStorePasswordPath": "change_it", - "security.keyStorePath": "/opt/app/prh/local/org.onap.prh.p12", - "security.keyStorePasswordPath": "change_it", - "security.enableAaiCertAuth": false, - "security.enableDmaapCertAuth": false -}
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/incorrect_config.json b/prh-app-server/src/test/resources/incorrect_config.json deleted file mode 100644 index a682402d..00000000 --- a/prh-app-server/src/test/resources/incorrect_config.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "configs": { - "aai": { - "aaiClientConfiguration": { - "aaiHost": "localhost", - "aaiPort": 8080, - "aaiIgnoreSslCertificateErrors": true, - "aaiProtocol": "https", - "aaiUserName": "admin", - "aaiUserPassword": "admin", - "aaiBasePath": "/aai/v11", - "aaiPnfPath": "/network/pnfs/pnf", - "aaiHeaders": { - "X-FromAppId": "prh", - "X-TransactionId": "9999", - "Accept": "application/json", - "Real-Time": "true", - "Content-Type": "application/merge-patch+json", - "Authorization": "Basic QUFJOkFBSQ==" - } - } - }, - "dmaap": { - "dmaapConsumerConfiguration": { - "consumerGroup": "other", - "consumerId": "1", - "dmaapContentType": "application/json", - "dmaapHostName": "localhost", - "dmaapPortNumber": 2222, - "dmaapProtocol": "http", - "dmaapTopicName": "temp", - "dmaapUserName": "admin", - "dmaapUserPassword": "admin", - "messageLimit": 1000, - "timeoutMs": 1000 - }, - "dmaapProducerConfiguration": { - "dmaapContentType": "application/json", - "dmaapHostName": "localhost", - "dmaapPortNumber": 2223, - "dmaapProtocol": "http", - "dmaaptopicName": "temp", - "dmaapuserName": "admin", - "dmaapuserPassword": "admin" - } - }, - "security": { - "trustStorePath": "/opt/app/prh/local/org.onap.prh.trust.jks", - "trustStorePasswordPath": "change it", - "keyStorePath": "/opt/app/prh/local/org.onap.prh.p12", - "keyStorePasswordPath": "change it", - "enableAaiCertAuth": "false", - "enableDmaapCertAuth": "false" - } - } -}
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/integration/event.json b/prh-app-server/src/test/resources/integration/event.json new file mode 100644 index 00000000..3a768df2 --- /dev/null +++ b/prh-app-server/src/test/resources/integration/event.json @@ -0,0 +1,37 @@ +{ + "event": { + "commonEventHeader": { + "startEpochMicrosec": 1540212137393, + "sourceId": "val13", + "eventId": "registration_40212137", + "nfcNamingCode": "oam", + "internalHeaderFields": { + "collectorTimeStamp": "Mon, 10 22 2018 12:42:18 UTC" + }, + "eventType": "pnfRegistration", + "priority": "Normal", + "version": "4.0.1", + "reportingEntityName": "NOK6061ZW8", + "sequence": 0, + "domain": "pnfRegistration", + "lastEpochMicrosec": 1540212137393, + "eventName": "pnfRegistration_Nokia_5gDu", + "vesEventListenerVersion": "7.0.1", + "sourceName": "NOK6061ZW8", + "nfNamingCode": "gNB" + }, + "pnfRegistrationFields": { + "unitType": "val8", + "serialNumber": "6061ZW9", + "pnfRegistrationFieldsVersion": "2.0", + "manufactureDate": "1540212137393", + "modelNumber": "val6", + "lastServiceDate": "1540212137393", + "unitFamily": "BBU", + "vendorName": "Nokia", + "oamV4IpAddress": "val3", + "oamV6IpAddress": "val4", + "softwareVersion": "val7" + } + } +}
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/keystore.password b/prh-app-server/src/test/resources/keystore.password new file mode 100644 index 00000000..39823872 --- /dev/null +++ b/prh-app-server/src/test/resources/keystore.password @@ -0,0 +1 @@ +mYHC98!qX}7h?W}jRv}MIXTJ
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/logback-test.xml b/prh-app-server/src/test/resources/logback-test.xml index c1f00665..c8db899a 100644 --- a/prh-app-server/src/test/resources/logback-test.xml +++ b/prh-app-server/src/test/resources/logback-test.xml @@ -1,21 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- - ~ ===============================LICENSE_START====================================== - ~ Copyright © 2017 AT&T Intellectual Property. 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> - <root level="OFF"/> -</configuration> + <include resource="org/springframework/boot/logging/logback/defaults.xml" /> + <include resource="org/springframework/boot/logging/logback/console-appender.xml" /> + + <logger name="ROOT" level="WARN"> + <appender-ref ref="CONSOLE"/> + </logger> +</configuration>
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker b/prh-app-server/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker new file mode 100644 index 00000000..ca6ee9ce --- /dev/null +++ b/prh-app-server/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker @@ -0,0 +1 @@ +mock-maker-inline
\ No newline at end of file diff --git a/prh-app-server/src/test/resources/not_json_object.json b/prh-app-server/src/test/resources/not_json_object.json deleted file mode 100644 index f50456ee..00000000 --- a/prh-app-server/src/test/resources/not_json_object.json +++ /dev/null @@ -1 +0,0 @@ -["a", "d", "d"] diff --git a/prh-app-server/src/test/resources/org.onap.dcae.jks b/prh-app-server/src/test/resources/org.onap.dcae.jks Binary files differnew file mode 100644 index 00000000..e74ce64f --- /dev/null +++ b/prh-app-server/src/test/resources/org.onap.dcae.jks diff --git a/prh-app-server/src/test/resources/org.onap.dcae.trust.jks b/prh-app-server/src/test/resources/org.onap.dcae.trust.jks Binary files differnew file mode 100644 index 00000000..10103cfb --- /dev/null +++ b/prh-app-server/src/test/resources/org.onap.dcae.trust.jks diff --git a/prh-app-server/src/test/resources/scheduled-context.xml b/prh-app-server/src/test/resources/scheduled-context.xml deleted file mode 100644 index 91919aa2..00000000 --- a/prh-app-server/src/test/resources/scheduled-context.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:task="http://www.springframework.org/schema/task" - xmlns:context="http://www.springframework.org/schema/context" - xsi:schemaLocation="http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.0.xsd - http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd"> - - <context:component-scan - base-package="org.onap.dcaegen2.services.prh"/> - <task:scheduled-tasks> - <task:scheduled ref="scheduleController" method="startTasks" - fixed-rate="1000"/> - </task:scheduled-tasks> -</beans> diff --git a/prh-app-server/src/test/resources/truststore.password b/prh-app-server/src/test/resources/truststore.password new file mode 100644 index 00000000..168e64bd --- /dev/null +++ b/prh-app-server/src/test/resources/truststore.password @@ -0,0 +1 @@ +*TQH?Lnszprs4LmlAj38yds(
\ No newline at end of file |