diff options
author | Jim Hahn <jrh3@att.com> | 2019-02-15 12:24:14 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-02-15 12:26:37 -0500 |
commit | cb8557e068ec89473dcb4d01a68e7dfd0a4644c5 (patch) | |
tree | 4e5eaea52f9a5f5416e75f28f18b5ffdef0b86e6 /policy-management/src/test/resources | |
parent | b47140e63ebc5d878c66935698df99a987a6418e (diff) |
Test gson in policy-management
Added jackson-like Gson annotations to policy-management classes.
Also added tests to verify that the classes serialize the same
with gson as with jackson.
Removed some trailing spaces.
Replaced tabs and adjusted spacing in json files.
Removed trailing newlines.
Updated license data per review comment.
Fixed merge conflict.
Added files that were inadvertently deleted.
Change-Id: Ib546e70f9d9d83187a6a93ff5c634000c4d53da5
Issue-ID: POLICY-1431
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-management/src/test/resources')
10 files changed, 143 insertions, 0 deletions
diff --git a/policy-management/src/test/resources/org/onap/policy/drools/controller/internal/MavenDroolsControllerTest.json b/policy-management/src/test/resources/org/onap/policy/drools/controller/internal/MavenDroolsControllerTest.json new file mode 100644 index 00000000..5ff6c2af --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/controller/internal/MavenDroolsControllerTest.json @@ -0,0 +1,14 @@ +{ + "alive": false, + "locked": false, + "recentSourceEvents": [], + "recentSinkEvents": [], + "modelClassLoaderHash": ${obj.modelClassLoaderHash}, + "groupId": "org.onap.policy.drools.test", + "artifactId": "echo", + "version": "${obj.version}", + "baseDomainNames": ["onap.policies.test"], + "brained": true, + "sessions": ["echo"], + "sessionCoordinates": ["org.onap.policy.drools.test:echo:${obj.version}:echo"] +} diff --git a/policy-management/src/test/resources/org/onap/policy/drools/controller/internal/NullDroolsControllerTest.json b/policy-management/src/test/resources/org/onap/policy/drools/controller/internal/NullDroolsControllerTest.json new file mode 100644 index 00000000..58bd0d90 --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/controller/internal/NullDroolsControllerTest.json @@ -0,0 +1,14 @@ +{ + "alive": false, + "locked": false, + "groupId": "NO-GROUP-ID", + "artifactId": "NO-ARTIFACT-ID", + "version": "NO-VERSION", + "sessionNames": [], + "container": null, + "baseDomainNames": [], + "brained": false, + "canonicalSessionNames": [], + "recentSourceEvents": [], + "recentSinkEvents": [] +} diff --git a/policy-management/src/test/resources/org/onap/policy/drools/protocol/configuration/ControllerConfigurationTest.json b/policy-management/src/test/resources/org/onap/policy/drools/protocol/configuration/ControllerConfigurationTest.json new file mode 100644 index 00000000..6b4196fd --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/protocol/configuration/ControllerConfigurationTest.json @@ -0,0 +1,11 @@ +{ + "name": "name", + "operation": "operation", + "drools": { + "artifactId": "org.onap.artifact", + "groupId": "group", + "version": "1.0.0" + }, + "foo": "bar", + "hello": "world" +} diff --git a/policy-management/src/test/resources/org/onap/policy/drools/protocol/configuration/DroolsConfigurationTest.json b/policy-management/src/test/resources/org/onap/policy/drools/protocol/configuration/DroolsConfigurationTest.json new file mode 100644 index 00000000..3869ea28 --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/protocol/configuration/DroolsConfigurationTest.json @@ -0,0 +1,7 @@ +{ + "artifactId": "org.onap.artifact", + "groupId": "group", + "version": "1.0.0", + "foo": "bar", + "hello": "world" +} diff --git a/policy-management/src/test/resources/org/onap/policy/drools/protocol/configuration/PdpdConfigurationTest.json b/policy-management/src/test/resources/org/onap/policy/drools/protocol/configuration/PdpdConfigurationTest.json new file mode 100644 index 00000000..f5495ffb --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/protocol/configuration/PdpdConfigurationTest.json @@ -0,0 +1,14 @@ +{ + "requestID": "${obj.requestID}", + "entity": "entity1", + "controllers": [ + { + "name": "name", + "operation": "operation" + }, + { + "name": "name2", + "operation": "operation2" + } + ] +} diff --git a/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyControllerFactoryTest.json b/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyControllerFactoryTest.json new file mode 100644 index 00000000..0c17f35f --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyControllerFactoryTest.json @@ -0,0 +1,3 @@ +{ + "features": ["feature-a", "feature-b"] +} diff --git a/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyEngineManagerTest.json b/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyEngineManagerTest.json new file mode 100644 index 00000000..db50e53c --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyEngineManagerTest.json @@ -0,0 +1,24 @@ +{ + "alive": false, + "controllers": [ + "controller-a", + "controller-b" + ], + "features": [ + "feature-a", + "feature-b" + ], + "httpServers": [ + { "port": 1001 }, + { "port": 1002 } + ], + "locked": false, + "sinks": [ + { "name": "sink1-topic" }, + { "name": "sink2-topic" } + ], + "sources": [ + { "name": "source1-topic" }, + { "name": "source2-topic" } + ] +} diff --git a/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyEngineTestAdd.json b/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyEngineTestAdd.json new file mode 100644 index 00000000..7a247d32 --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyEngineTestAdd.json @@ -0,0 +1,20 @@ +{ + "alive": true, + "locked": false, + "sources": [], + "sinks": [], + "httpServers": [ + { + "name": "TELEMETRY", + "host": "localhost", + "port": 9698, + "user": null, + "alive": true, + "aaf": false + } + ], + "features": [], + "controllers": [ + "foo" + ] +} diff --git a/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyEngineTestConfig.json b/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyEngineTestConfig.json new file mode 100644 index 00000000..7f06f5a0 --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/system/PolicyEngineTestConfig.json @@ -0,0 +1,18 @@ +{ + "alive": false, + "locked": false, + "sources": [], + "sinks": [], + "httpServers": [ + { + "name": "TELEMETRY", + "host": "localhost", + "port": 9698, + "user": null, + "alive": false, + "aaf": false + } + ], + "features": [], + "controllers": [] +} diff --git a/policy-management/src/test/resources/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.json b/policy-management/src/test/resources/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.json new file mode 100644 index 00000000..3557f21d --- /dev/null +++ b/policy-management/src/test/resources/org/onap/policy/drools/system/internal/AggregatedPolicyControllerTest.json @@ -0,0 +1,18 @@ +{ + "alive": false, + "drools": { + "artifact": "artifact-a", + "group": "group-a", + "version": "version-a" + }, + "locked": false, + "name": "agg-name", + "topicSinks": [ + { "name": "sink-a" }, + { "name": "sink-b" } + ], + "topicSources": [ + { "name": "source-a" }, + { "name": "source-b" } + ] +} |