diff options
Diffstat (limited to 'main/src/test/resources')
17 files changed, 292 insertions, 38 deletions
diff --git a/main/src/test/resources/parameters/DistributionConfigParameters.json b/main/src/test/resources/parameters/DistributionConfigParameters.json index acf56764..71ca92e3 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -50,5 +51,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json index e22af281..9e83ac19 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyDecoder.json @@ -46,5 +46,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json index 4d271308..2a7174e0 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyPolicyForwarder.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -45,5 +46,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json index c25b2e35..3560dbca 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandler.json @@ -30,5 +30,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } }
\ No newline at end of file diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandlerClass.json b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandlerClass.json index ef129fd6..65ba903f 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandlerClass.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_EmptyReceptionHandlerClass.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -50,5 +51,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderAndForwarderParameters.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderAndForwarderParameters.json index bd52e186..28f2195e 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderAndForwarderParameters.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderAndForwarderParameters.json @@ -15,15 +15,18 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" }, "APEXDecoder":{ "decoderType":"", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.PolicyDecoderApexPdpa" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.PolicyDecoderApexPdpa", + "decoderConfigurationParameters": "dummyDecoderConfiguration" }, "DROOLSDecoder":{ "decoderType":"DROOLS", - "decoderClassName":"" + "decoderClassName":"", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -69,5 +72,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderConfigurationClassName.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderConfigurationClassName.json new file mode 100644 index 00000000..cba76644 --- /dev/null +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidDecoderConfigurationClassName.json @@ -0,0 +1,64 @@ +{ + "name":"SDCDistributionGroup", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34" + }, + "receptionHandlerParameters":{ + "DummyReceptionHandler":{ + "receptionHandlerType":"DummyReceptionHandler", + "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler", + "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration", + "pluginHandlerParameters":{ + "policyDecoders":{ + "DummyDecoder":{ + "decoderType":"DummyDecoder", + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" + } + }, + "policyForwarders":{ + "DummyForwarder":{ + "forwarderType":"DummyForwarder", + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationParameters": "dummyConfiguration" + } + } + } + } + }, + "receptionHandlerConfigurationParameters":{ + "dummyReceptionHandlerConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup", + "parameters":{ + "myStringParameter": "stringValue", + "myIntegerParameter":20, + "myBooleanParameter": true + } + } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } + } +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json index 60c28e08..13265c8a 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidForwarderConfigurationClassName.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -50,5 +51,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json index 46207204..9a0b309f 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidName.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -50,5 +51,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json index d033a730..350ace9e 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerClass.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -50,5 +51,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json index 123ff203..6776c370 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidReceptionHandlerParameters.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -50,5 +51,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json index 47528ce0..b5fd9a7a 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_InvalidRestServerParameters.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -50,5 +51,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json index f78bb65f..a007c30b 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyDecoder.json @@ -44,5 +44,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json index 3ac54f73..72608b3b 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_NoPolicyForwarder.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } } } @@ -30,5 +31,14 @@ "myBooleanParameter": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_UnknownDecoderConfigurationClassName.json b/main/src/test/resources/parameters/DistributionConfigParameters_UnknownDecoderConfigurationClassName.json new file mode 100644 index 00000000..2ce665f9 --- /dev/null +++ b/main/src/test/resources/parameters/DistributionConfigParameters_UnknownDecoderConfigurationClassName.json @@ -0,0 +1,64 @@ +{ + "name":"SDCDistributionGroup", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34" + }, + "receptionHandlerParameters":{ + "DummyReceptionHandler":{ + "receptionHandlerType":"DummyReceptionHandler", + "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler", + "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration", + "pluginHandlerParameters":{ + "policyDecoders":{ + "DummyDecoder":{ + "decoderType":"DummyDecoder", + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" + } + }, + "policyForwarders":{ + "DummyForwarder":{ + "forwarderType":"DummyForwarder", + "forwarderClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarder", + "forwarderConfigurationParameters": "dummyConfiguration" + } + } + } + } + }, + "receptionHandlerConfigurationParameters":{ + "dummyReceptionHandlerConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandlerParameterGroup", + "parameters":{ + "myStringParameter": "stringValue", + "myIntegerParameter":20, + "myBooleanParameter": true + } + } + }, + "policyForwarderConfigurationParameters":{ + "dummyConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyForwarderParameterGroup", + "parameters":{ + "useHttps": false, + "hostname": "192.168.99.100", + "port": 8081, + "userName": "user", + "password": "pw123", + "isManaged": true + } + } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.Unknown", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } + } +} diff --git a/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json b/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json index 3118631b..1883b221 100644 --- a/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json +++ b/main/src/test/resources/parameters/DistributionConfigParameters_UnknownForwarderConfigurationClassName.json @@ -10,35 +10,13 @@ "DummyReceptionHandler":{ "receptionHandlerType":"DummyReceptionHandler", "receptionHandlerClassName":"org.onap.policy.distribution.main.testclasses.DummyReceptionHandler", - "pssdConfiguration":{ - "asdcAddress": "localhost", - "messageBusAddress": [ - "a.com", - "b.com", - "c.com" - ], - "user": "tbdsdc-1480", - "password": "tbdsdc-1480", - "pollingInterval":20, - "pollingTimeout":30, - "consumerId": "policy-id", - "artifactTypes": [ - "TOSCA_CSAR", - "HEAT" - ], - "consumerGroup": "policy-group", - "environmentName": "environmentName", - "keystorePath": "null", - "keystorePassword": "null", - "activeserverTlsAuth": false, - "isFilterinEmptyResources": true, - "isUseHttpsWithDmaap": false - }, + "receptionHandlerConfigurationName":"dummyReceptionHandlerConfiguration", "pluginHandlerParameters":{ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationParameters": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -73,5 +51,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } diff --git a/main/src/test/resources/parameters/MinimumParameters.json b/main/src/test/resources/parameters/MinimumParameters.json index fc6b16aa..5401d924 100644 --- a/main/src/test/resources/parameters/MinimumParameters.json +++ b/main/src/test/resources/parameters/MinimumParameters.json @@ -15,7 +15,8 @@ "policyDecoders":{ "DummyDecoder":{ "decoderType":"DummyDecoder", - "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder" + "decoderClassName":"org.onap.policy.distribution.main.testclasses.DummyDecoder", + "decoderConfigurationName": "dummyDecoderConfiguration" } }, "policyForwarders":{ @@ -50,5 +51,14 @@ "isManaged": true } } + }, + "policyDecoderConfigurationParameters":{ + "dummyDecoderConfiguration":{ + "parameterClassName":"org.onap.policy.distribution.main.testclasses.DummyPolicyDecoderParameterGroup", + "parameters":{ + "policyName": "SamplePolicy", + "policyType": "DUMMY" + } + } } } |