diff options
Diffstat (limited to 'main/src/test/resources')
13 files changed, 8 insertions, 257 deletions
diff --git a/main/src/test/resources/application-test.yaml b/main/src/test/resources/application-test.yaml new file mode 100644 index 00000000..240d3640 --- /dev/null +++ b/main/src/test/resources/application-test.yaml @@ -0,0 +1,8 @@ +database: + name: PolicyProviderParameterGroup + implementation: org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl + driver: org.h2.Driver + url: jdbc:h2:mem:testdb + user: policy_user + password: policy_user + persistenceUnit: ToscaConceptTest
\ No newline at end of file diff --git a/main/src/test/resources/logback-test.xml b/main/src/test/resources/logback-test.xml deleted file mode 100644 index 88187371..00000000 --- a/main/src/test/resources/logback-test.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - ============LICENSE_START======================================================= - Copyright (C) 2016-2018 Ericsson. 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. - - SPDX-License-Identifier: Apache-2.0 - ============LICENSE_END========================================================= ---> - -<configuration> - - <contextName>policy-api</contextName> - <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> - - <!-- 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> - - <logger name="org.onap.policy.api" level="INFO" additivity="false"> - <appender-ref ref="STDOUT" /> - </logger> - - <logger name="org.onap.policy.common.gson.GsonMessageBodyHandler" level="WARN" additivity="false"> - <appender-ref ref="STDOUT" /> - </logger> - - <logger name="org.onap.policy.common.endpoints.http.server.YamlMessageBodyHandler" level="WARN" additivity="false"> - <appender-ref ref="STDOUT" /> - </logger> - - <logger name="org.eclipse.jetty.server.RequestLog" level="WARN" additivity="false"> - <appender-ref ref="STDOUT" /> - </logger> -</configuration> diff --git a/main/src/test/resources/parameters/ApiConfigParameters_Https.json b/main/src/test/resources/parameters/ApiConfigParameters_Https.json deleted file mode 100644 index 1d33e2ec..00000000 --- a/main/src/test/resources/parameters/ApiConfigParameters_Https.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name":"ApiGroup", - "restServerParameters":{ - "host":"0.0.0.0", - "port":6969, - "userName":"policyadmin", - "password":"zb!XztG34", - "https":true - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.h2.Driver", - "databaseUrl": "jdbc:h2:mem:testdb", - "databaseUser": "policy", - "databasePassword": "UDAxaWNZ", - "persistenceUnit": "ToscaConceptTest" - }, - "preloadPolicyTypes": [ - "policytypes/onap.policies.monitoring.tcagen2.yaml", - "policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml", - "policytypes/onap.policies.monitoring.dcae-restconfcollector.yaml", - "policytypes/onap.policies.monitoring.dcae-pm-subscription-handler.yaml", - "policytypes/onap.policies.monitoring.dcae-pm-mapper.yaml", - "policytypes/onap.policies.Optimization.yaml", - "policytypes/onap.policies.optimization.Resource.yaml", - "policytypes/onap.policies.optimization.Service.yaml", - "policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml", - "policytypes/onap.policies.optimization.resource.DistancePolicy.yaml", - "policytypes/onap.policies.optimization.resource.HpaPolicy.yaml", - "policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml", - "policytypes/onap.policies.optimization.resource.PciPolicy.yaml", - "policytypes/onap.policies.optimization.service.QueryPolicy.yaml", - "policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml", - "policytypes/onap.policies.optimization.resource.Vim_fit.yaml", - "policytypes/onap.policies.optimization.resource.VnfPolicy.yaml", - "policytypes/onap.policies.controlloop.guard.Common.yaml", - "policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml", - "policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml", - "policytypes/onap.policies.controlloop.guard.common.MinMax.yaml", - "policytypes/onap.policies.controlloop.guard.common.Filter.yaml", - "policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml", - "policytypes/onap.policies.controlloop.Operational.yaml", - "policytypes/onap.policies.Naming.yaml", - "policytypes/onap.policies.Match.yaml", - "policytypes/onap.policies.native.Drools.yaml", - "policytypes/onap.policies.native.Xacml.yaml", - "policytypes/onap.policies.native.Apex.yaml", - "policytypes/onap.policies.controlloop.operational.Common.yaml", - "policytypes/onap.policies.controlloop.operational.common.Apex.yaml", - "policytypes/onap.policies.controlloop.operational.common.Drools.yaml" - ], - "preloadPolicies" : [ - "policies/sdnc.policy.naming.input.tosca.yaml" - ] -} diff --git a/main/src/test/resources/parameters/ApiConfigParameters_InvalidName.json b/main/src/test/resources/parameters/ApiConfigParameters_InvalidName.json deleted file mode 100644 index 832035ec..00000000 --- a/main/src/test/resources/parameters/ApiConfigParameters_InvalidName.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name":" ", - "restServerParameters":{ - "host":"0.0.0.0", - "port":6969, - "userName":"policyadmin", - "password":"zb!XztG34" - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseUrl": "jdbc:h2:mem:testdb", - "databaseUser": "policy", - "databasePassword": "UDAxaWNZ", - "persistenceUnit": "ToscaConceptTest" - }, - "preloadPolicyTypes": [], - "preloadPolicies": [] -} diff --git a/main/src/test/resources/parameters/ApiConfigParameters_InvalidRestServerParameters.json b/main/src/test/resources/parameters/ApiConfigParameters_InvalidRestServerParameters.json deleted file mode 100644 index 4e9083ec..00000000 --- a/main/src/test/resources/parameters/ApiConfigParameters_InvalidRestServerParameters.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name":"ApiGroup", - "restServerParameters":{ - "host":"", - "port":-1, - "userName":"", - "password":"" - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.h2.Driver", - "databaseUrl": "jdbc:h2:mem:testdb", - "databaseUser": "policy", - "databasePassword": "UDAxaWNZ", - "persistenceUnit": "ToscaConceptTest" - }, - "preloadPolicyTypes": [], - "preloadPolicies": [] -} diff --git a/main/src/test/resources/parameters/ApiConfigParameters_Postgres.json b/main/src/test/resources/parameters/ApiConfigParameters_Postgres.json deleted file mode 100644 index e5c375a0..00000000 --- a/main/src/test/resources/parameters/ApiConfigParameters_Postgres.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name":"ApiGroup", - "restServerParameters":{ - "host":"0.0.0.0", - "port":6968, - "userName":"healthcheck", - "password":"zb!XztG34", - "https":false - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.postgresql.Driver", - "databaseUrl": "jdbc:postgresql://localhost:5432/policyadmin", - "databaseUser": "policy_user", - "databasePassword": "policy_user", - "persistenceUnit": "PolicyDb" - }, - "preloadPolicyTypes": [ - "policytypes/onap.policies.monitoring.tcagen2.yaml", - "policytypes/onap.policies.monitoring.dcaegen2.collectors.datafile.datafile-app-server.yaml", - "policytypes/onap.policies.monitoring.dcae-restconfcollector.yaml", - "policytypes/onap.policies.monitoring.dcae-pm-subscription-handler.yaml", - "policytypes/onap.policies.monitoring.dcae-pm-mapper.yaml", - "policytypes/onap.policies.Optimization.yaml", - "policytypes/onap.policies.optimization.Resource.yaml", - "policytypes/onap.policies.optimization.Service.yaml", - "policytypes/onap.policies.optimization.resource.AffinityPolicy.yaml", - "policytypes/onap.policies.optimization.resource.DistancePolicy.yaml", - "policytypes/onap.policies.optimization.resource.HpaPolicy.yaml", - "policytypes/onap.policies.optimization.resource.OptimizationPolicy.yaml", - "policytypes/onap.policies.optimization.resource.PciPolicy.yaml", - "policytypes/onap.policies.optimization.service.QueryPolicy.yaml", - "policytypes/onap.policies.optimization.service.SubscriberPolicy.yaml", - "policytypes/onap.policies.optimization.resource.Vim_fit.yaml", - "policytypes/onap.policies.optimization.resource.VnfPolicy.yaml", - "policytypes/onap.policies.controlloop.guard.Common.yaml", - "policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml", - "policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml", - "policytypes/onap.policies.controlloop.guard.common.MinMax.yaml", - "policytypes/onap.policies.controlloop.guard.common.Filter.yaml", - "policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond.yaml", - "policytypes/onap.policies.controlloop.Operational.yaml", - "policytypes/onap.policies.Naming.yaml", - "policytypes/onap.policies.Match.yaml", - "policytypes/onap.policies.native.Drools.yaml", - "policytypes/onap.policies.native.Xacml.yaml", - "policytypes/onap.policies.native.Apex.yaml", - "policytypes/onap.policies.controlloop.operational.Common.yaml", - "policytypes/onap.policies.controlloop.operational.common.Apex.yaml", - "policytypes/onap.policies.controlloop.operational.common.Drools.yaml" - ], - "preloadPolicies" : [ - "policies/sdnc.policy.naming.input.tosca.yaml" - ] -} diff --git a/main/src/test/resources/parameters/BadParameters.json b/main/src/test/resources/parameters/BadParameters.json deleted file mode 100644 index de2040cc..00000000 --- a/main/src/test/resources/parameters/BadParameters.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : [] -}
\ No newline at end of file diff --git a/main/src/test/resources/parameters/EmptyParameters.json b/main/src/test/resources/parameters/EmptyParameters.json deleted file mode 100644 index e69de29b..00000000 --- a/main/src/test/resources/parameters/EmptyParameters.json +++ /dev/null diff --git a/main/src/test/resources/parameters/InvalidParameters.json b/main/src/test/resources/parameters/InvalidParameters.json deleted file mode 100644 index de2040cc..00000000 --- a/main/src/test/resources/parameters/InvalidParameters.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name" : [] -}
\ No newline at end of file diff --git a/main/src/test/resources/parameters/MinimumParameters.json b/main/src/test/resources/parameters/MinimumParameters.json deleted file mode 100644 index 5d671d2f..00000000 --- a/main/src/test/resources/parameters/MinimumParameters.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name":"ApiGroup", - "restServerParameters":{ - "host":"0.0.0.0", - "port":6969, - "userName":"policyadmin", - "password":"zb!XztG34" - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.h2.Driver", - "databaseUrl": "jdbc:h2:mem:testdb", - "databaseUser": "policy", - "databasePassword": "UDAxaWNZ", - "persistenceUnit": "ToscaConceptTest" - }, - "preloadPolicyTypes": [], - "preloadPolicies": [] -}
\ No newline at end of file diff --git a/main/src/test/resources/parameters/NoParameters.json b/main/src/test/resources/parameters/NoParameters.json deleted file mode 100644 index 36e33afb..00000000 --- a/main/src/test/resources/parameters/NoParameters.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "restServerParameters":{ - "host":"0.0.0.0", - "port":6969, - "userName":"policyadmin", - "password":"zb!XztG34" - }, - "databaseProviderParameters": { - "name": "PolicyProviderParameterGroup", - "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", - "databaseDriver": "org.h2.Driver", - "databaseUrl": "jdbc:h2:mem:testdb", - "databaseUser": "policy", - "databasePassword": "UDAxaWNZ", - "persistenceUnit": "ToscaConceptTest" - }, - "preloadPolicyTypes": [], - "preloadPolicies": [] -}
\ No newline at end of file diff --git a/main/src/test/resources/parameters/RestServerParameters.json b/main/src/test/resources/parameters/RestServerParameters.json deleted file mode 100644 index 8d3bc580..00000000 --- a/main/src/test/resources/parameters/RestServerParameters.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "host": "0.0.0.0", - "port": 6969, - "userName": "policyadmin", - "password": "zb!XztG34" -} diff --git a/main/src/test/resources/parameters/RestServerParametersEmpty.json b/main/src/test/resources/parameters/RestServerParametersEmpty.json deleted file mode 100644 index e02aef27..00000000 --- a/main/src/test/resources/parameters/RestServerParametersEmpty.json +++ /dev/null @@ -1,2 +0,0 @@ -{
-}
\ No newline at end of file |