summaryrefslogtreecommitdiffstats
path: root/prh-app-server/src/test
diff options
context:
space:
mode:
authormicdzied <michal.1.dziedzic@nokia.com>2019-03-22 12:32:53 +0100
committermicdzied <michal.1.dziedzic@nokia.com>2019-04-08 14:25:04 +0200
commit624618c0d343c707d1a40588c3e226f8db2a2203 (patch)
tree3d0195aaf07bdb1e7a24051c2ac42c1f3ac2528a /prh-app-server/src/test
parent2abfecad9aeb88ba95d62d718376535fb6e00325 (diff)
use CBS SDK in PRH
-remove unused classes -fix junit tests -use cbs Change-Id: Ibc5841b713ad00522dd78a52b7cb7efa871cb8b4 Issue-ID: DCAEGEN2-1360 Signed-off-by: micdzied <michal.1.dziedzic@nokia.com>
Diffstat (limited to 'prh-app-server/src/test')
-rw-r--r--prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/ConsulConfigurationParserTest.java (renamed from prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/CloudConfigParserTest.java)12
-rw-r--r--prh-app-server/src/test/resources/flattened_configuration.json78
2 files changed, 46 insertions, 44 deletions
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/CloudConfigParserTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/ConsulConfigurationParserTest.java
index 8f421034..3c746940 100644
--- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/CloudConfigParserTest.java
+++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/configuration/ConsulConfigurationParserTest.java
@@ -37,7 +37,7 @@ import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.config.Immutabl
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.config.ImmutableDmaapPublisherConfiguration;
-class CloudConfigParserTest {
+class ConsulConfigurationParserTest {
private final String correctJson =
new String(Files.readAllBytes(Paths.get(getSystemResource("flattened_configuration.json").toURI())));
@@ -47,16 +47,16 @@ class CloudConfigParserTest {
TestAppConfiguration.createDefaultDmaapConsumerConfiguration();
private final ImmutableDmaapPublisherConfiguration correctDmaapPublisherConfig =
TestAppConfiguration.createDefaultDmaapPublisherConfiguration();
- private final CloudConfigParser cloudConfigParser = new CloudConfigParser(
+ private final ConsulConfigurationParser consulConfigurationParser = new ConsulConfigurationParser(
new Gson().fromJson(correctJson, JsonObject.class));
- CloudConfigParserTest() throws Exception {
+ ConsulConfigurationParserTest() throws Exception {
}
@Test
void shouldCreateAaiConfigurationCorrectly() {
// when
- AaiClientConfiguration aaiClientConfig = cloudConfigParser.getAaiClientConfig();
+ AaiClientConfiguration aaiClientConfig = consulConfigurationParser.getAaiClientConfig();
// then
assertThat(aaiClientConfig).isNotNull();
@@ -67,7 +67,7 @@ class CloudConfigParserTest {
@Test
void shouldCreateDmaapConsumerConfigurationCorrectly() {
// when
- DmaapConsumerConfiguration dmaapConsumerConfig = cloudConfigParser.getDmaapConsumerConfig();
+ DmaapConsumerConfiguration dmaapConsumerConfig = consulConfigurationParser.getDmaapConsumerConfig();
// then
assertThat(dmaapConsumerConfig).isNotNull();
@@ -78,7 +78,7 @@ class CloudConfigParserTest {
@Test
void shouldCreateDmaapPublisherConfigurationCorrectly() {
// when
- DmaapPublisherConfiguration dmaapPublisherConfig = cloudConfigParser.getDmaapPublisherConfig();
+ DmaapPublisherConfiguration dmaapPublisherConfig = consulConfigurationParser.getDmaapPublisherConfig();
// then
assertThat(dmaapPublisherConfig).isNotNull();
diff --git a/prh-app-server/src/test/resources/flattened_configuration.json b/prh-app-server/src/test/resources/flattened_configuration.json
index 3c1cc9ac..48b45a80 100644
--- a/prh-app-server/src/test/resources/flattened_configuration.json
+++ b/prh-app-server/src/test/resources/flattened_configuration.json
@@ -1,40 +1,42 @@
{
- "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true,
- "dmaap.dmaapProducerConfiguration.dmaapTopicName": "/events/unauthenticated.PNF_READY",
- "dmaap.dmaapUpdateProducerConfiguration.dmaapTopicName": "/events/unauthenticated.PNF_UPDATE",
- "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
- "dmaap.dmaapConsumerConfiguration.dmaapHostName": "message-router.onap.svc.cluster.local",
- "aai.aaiClientConfiguration.pnfUrl": "https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf",
- "aai.aaiClientConfiguration.aaiPnfPath": "/network/pnfs/pnf",
- "aai.aaiClientConfiguration.aaiServiceInstancePath": "/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}",
- "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.dmaapUpdateProducerConfiguration.dmaapProtocol": "http",
- "dmaap.dmaapUpdateProducerConfiguration.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",
- "dmaap.dmaapUpdateProducerConfiguration.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
+ "config": {
+ "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true,
+ "dmaap.dmaapProducerConfiguration.dmaapTopicName": "/events/unauthenticated.PNF_READY",
+ "dmaap.dmaapUpdateProducerConfiguration.dmaapTopicName": "/events/unauthenticated.PNF_UPDATE",
+ "dmaap.dmaapConsumerConfiguration.timeoutMs": -1,
+ "dmaap.dmaapConsumerConfiguration.dmaapHostName": "message-router.onap.svc.cluster.local",
+ "aai.aaiClientConfiguration.pnfUrl": "https://aai.onap.svc.cluster.local:8443/aai/v12/network/pnfs/pnf",
+ "aai.aaiClientConfiguration.aaiPnfPath": "/network/pnfs/pnf",
+ "aai.aaiClientConfiguration.aaiServiceInstancePath": "/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}",
+ "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.dmaapUpdateProducerConfiguration.dmaapProtocol": "http",
+ "dmaap.dmaapUpdateProducerConfiguration.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",
+ "dmaap.dmaapUpdateProducerConfiguration.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