aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/test/resources')
-rw-r--r--main/src/test/resources/application-test-e2e.yaml90
-rw-r--r--main/src/test/resources/application-test.yaml (renamed from main/src/test/resources/config/application.yaml)16
-rw-r--r--main/src/test/resources/e2e/PapConfigParameters.json10
3 files changed, 105 insertions, 11 deletions
diff --git a/main/src/test/resources/application-test-e2e.yaml b/main/src/test/resources/application-test-e2e.yaml
new file mode 100644
index 00000000..09a2ca6a
--- /dev/null
+++ b/main/src/test/resources/application-test-e2e.yaml
@@ -0,0 +1,90 @@
+spring:
+ security:
+ user:
+ name: policyadmin
+ password: zb!XztG34
+ http:
+ converters:
+ preferred-json-mapper: gson
+ datasource:
+ url: jdbc:h2:mem:testdb
+ driverClassName: org.h2.Driver
+ jpa:
+ properties:
+ hibernate:
+ dialect: org.hibernate.dialect.H2Dialect
+ hibernate:
+ ddl-auto: create-drop
+ naming:
+ physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
+ implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
+
+server:
+ port: 6969
+
+pap:
+ name: "PapGroupE2E"
+ aaf: false
+ topic:
+ pdp-pap.name: pdp-pap-topic
+ notification.name: notification-topic
+ heartbeat.name: heartbeat-topic
+ pdpParameters:
+ updateParameters:
+ maxRetryCount: 1
+ maxWaitMs: 3000
+ stateChangeParameters:
+ maxRetryCount: 1
+ maxWaitMs: 3000
+ heartBeatMs: 6000
+ maxMessageAgeMs: 20000
+ savePdpStatisticsInDb: true
+ topicParameterGroup:
+ topicSources:
+ - topic: ${pap.topic.pdp-pap.name}
+ servers:
+ - message-router
+ topicCommInfrastructure: noop
+ - topic: ${pap.topic.heartbeat.name}
+ effectiveTopic: ${pap.topic.pdp-pap.name}
+ consumerGroup: policy-pap
+ servers:
+ - message-router
+ topicCommInfrastructure: noop
+ topicSinks:
+ - topic: ${pap.topic.pdp-pap.name}
+ servers:
+ - message-router
+ topicCommInfrastructure: noop
+ - topic: ${pap.topic.notification.name}
+ servers:
+ - message-router
+ topicCommInfrastructure: noop
+ healthCheckRestClientParameters:
+ - clientName: api
+ hostname: policy-api
+ port: 6969
+ userName: policyadmin
+ password: zb!XztG34
+ useHttps: true
+ basePath: policy/api/v1/healthcheck
+ - clientName: distribution
+ hostname: policy-distribution
+ port: 6969
+ userName: healthcheck
+ password: zb!XztG34
+ useHttps: true
+ basePath: healthcheck
+ - clientName: dmaap
+ hostname: message-router
+ port: 3905
+ useHttps: true
+ basePath: topics
+
+management:
+ endpoints:
+ web:
+ base-path: /
+ exposure:
+ include: health, metrics, prometheus
+ path-mapping.prometheus: metrics
diff --git a/main/src/test/resources/config/application.yaml b/main/src/test/resources/application-test.yaml
index 2fb9514d..de32fc43 100644
--- a/main/src/test/resources/config/application.yaml
+++ b/main/src/test/resources/application-test.yaml
@@ -14,7 +14,7 @@ spring:
hibernate:
dialect: org.hibernate.dialect.H2Dialect
hibernate:
- ddl-auto: update
+ ddl-auto: create-drop
naming:
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
@@ -25,6 +25,10 @@ server:
pap:
name: "PapGroup"
aaf: false
+ topic:
+ pdp-pap.name: POLICY-PDP-PAP
+ notification.name: POLICY-NOTIFICATION
+ heartbeat.name: POLICY-HEARTBEAT
pdpParameters:
updateParameters:
maxRetryCount: 1
@@ -37,22 +41,22 @@ pap:
savePdpStatisticsInDb: true
topicParameterGroup:
topicSources:
- - topic: POLICY-PDP-PAP
+ - topic: ${pap.topic.pdp-pap.name}
servers:
- message-router
topicCommInfrastructure: noop
- - topic: POLICY-HEARTBEAT
- effectiveTopic: POLICY-PDP-PAP
+ - topic: ${pap.topic.heartbeat.name}
+ effectiveTopic: ${pap.topic.pdp-pap.name}
consumerGroup: policy-pap
servers:
- message-router
topicCommInfrastructure: noop
topicSinks:
- - topic: POLICY-PDP-PAP
+ - topic: ${pap.topic.pdp-pap.name}
servers:
- message-router
topicCommInfrastructure: noop
- - topic: POLICY-NOTIFICATION
+ - topic: ${pap.topic.notification.name}
servers:
- message-router
topicCommInfrastructure: noop
diff --git a/main/src/test/resources/e2e/PapConfigParameters.json b/main/src/test/resources/e2e/PapConfigParameters.json
index b2e100a5..e7f33771 100644
--- a/main/src/test/resources/e2e/PapConfigParameters.json
+++ b/main/src/test/resources/e2e/PapConfigParameters.json
@@ -1,5 +1,5 @@
{
- "name": "PapGroup",
+ "name": "PapGroupE2E",
"restServerParameters": {
"host": "0.0.0.0",
"port": ${port},
@@ -29,23 +29,23 @@
},
"topicParameterGroup": {
"topicSources" : [{
- "topic" : "POLICY-PDP-PAP",
+ "topic" : "pdp-pap-topic",
"servers" : [ "message-router" ],
"topicCommInfrastructure" : "noop"
},
{
- "topic" : "POLICY-HEARTBEAT",
+ "topic" : "heartbeat-topic",
"effectiveTopic": "POLICY-PDP-PAP",
"consumerGroup": "policy-pap",
"servers" : [ "message-router" ],
"topicCommInfrastructure" : "noop"
}],
"topicSinks" : [{
- "topic" : "POLICY-PDP-PAP",
+ "topic" : "pdp-pap-topic",
"servers" : [ "message-router" ],
"topicCommInfrastructure" : "noop"
},{
- "topic" : "POLICY-NOTIFICATION",
+ "topic" : "notification-topic",
"servers" : [ "message-router" ],
"topicCommInfrastructure" : "noop"
}]