aboutsummaryrefslogtreecommitdiffstats
path: root/models-pdp/src/test/resources
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-04-08 13:58:53 +0000
committerliamfallon <liam.fallon@est.tech>2019-04-08 13:58:53 +0000
commit9ce39af891ccf063d46e18ecf5a2a47eb1408930 (patch)
treeeb55cc63c83ea34f73aeaaae5039c96283b66ef8 /models-pdp/src/test/resources
parenteb7127ac85b3df30a09277721a5f9271033843e7 (diff)
Add bug fixes and tests for filters
Fixed bugs on filtering where lack of null checks was blocking all results. Added unit test for PDP related JPA objects. Fixed cascading and orphan control on JPA objects. Added partial testing of PdpProvider. Added partial testing of filters. Changed tag for content of operational policies from "Content" to "content". Issue-ID: POLICY-1095 Change-Id: Ieb22e06955a8434b490bae7d0f6b77d4479515e8 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'models-pdp/src/test/resources')
-rw-r--r--models-pdp/src/test/resources/testdata/PdpGroups0Update.json83
-rw-r--r--models-pdp/src/test/resources/testdata/PdpGroupsForFiltering.json199
2 files changed, 282 insertions, 0 deletions
diff --git a/models-pdp/src/test/resources/testdata/PdpGroups0Update.json b/models-pdp/src/test/resources/testdata/PdpGroups0Update.json
new file mode 100644
index 000000000..a54ec53ea
--- /dev/null
+++ b/models-pdp/src/test/resources/testdata/PdpGroups0Update.json
@@ -0,0 +1,83 @@
+{
+ "groups": [
+ {
+ "name": "PdpGroup0",
+ "version": "1.2.3",
+ "description": "group description",
+ "pdpGroupState": "PASSIVE",
+ "properties": {
+ "groupProperty0": "Value of Group Property 0"
+ },
+ "pdpSubgroups": [
+ {
+ "pdpType": "APEX",
+ "supportedPolicyTypes": [
+ {
+ "name": "policy.type.0",
+ "version": "1.2.3"
+ }
+ ],
+ "policies": [
+ {
+ "name": "Policy0",
+ "version": "4.5.6"
+ }
+ ],
+ "currentInstanceCount": 123,
+ "desiredInstanceCount": 456,
+ "properties": {
+ "subgroupProperty0": "Value of sub Group Property 0"
+ },
+ "pdpInstances": [
+ {
+ "instanceId": "apex-0",
+ "pdpState": "ACTIVE",
+ "healthy": "NOT_HEALTHY",
+ "message": "message from PDP"
+ },
+ {
+ "instanceId": "apex-1",
+ "pdpState": "ACTIVE",
+ "healthy": "NOT_HEALTHY",
+ "message": "message from PDP"
+ },
+ {
+ "instanceId": "apex-2",
+ "pdpState": "ACTIVE",
+ "healthy": "NOT_HEALTHY",
+ "message": "message from PDP"
+ }
+ ]
+ },
+ {
+ "pdpType": "Drools",
+ "supportedPolicyTypes": [
+ {
+ "name": "policy.type.1",
+ "version": "4.5.6"
+ }
+ ],
+ "policies": [
+ {
+ "name": "Policy0",
+ "version": "4.5.6"
+ }
+ ],
+ "currentInstanceCount": 123,
+ "desiredInstanceCount": 456,
+ "properties": {
+ "subgroupProperty0": "Value of sub Group Property 0"
+ },
+ "pdpInstances": [
+ {
+ "instanceId": "drools-0",
+ "pdpState": "ACTIVE",
+ "healthy": "NOT_HEALTHY",
+ "message": "message from PDP"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/models-pdp/src/test/resources/testdata/PdpGroupsForFiltering.json b/models-pdp/src/test/resources/testdata/PdpGroupsForFiltering.json
new file mode 100644
index 000000000..c62e1ea58
--- /dev/null
+++ b/models-pdp/src/test/resources/testdata/PdpGroupsForFiltering.json
@@ -0,0 +1,199 @@
+{
+ "groups": [
+ {
+ "name": "PdpGroup0",
+ "version": "1.2.3",
+ "description": "group description",
+ "pdpGroupState": "PASSIVE",
+ "properties": {
+ "groupProperty0": "Value of Group Property 0"
+ },
+ "pdpSubgroups": [
+ {
+ "pdpType": "APEX",
+ "supportedPolicyTypes": [
+ {
+ "name": "policy.type.0",
+ "version": "1.2.3"
+ }
+ ],
+ "policies": [
+ {
+ "name": "Policy0",
+ "version": "4.5.6"
+ }
+ ],
+ "currentInstanceCount": 123,
+ "desiredInstanceCount": 456,
+ "properties": {
+ "subgroupProperty0": "Value of sub Group Property 0"
+ },
+ "pdpInstances": [
+ {
+ "instanceId": "apex-0",
+ "pdpState": "ACTIVE",
+ "healthy": "NOT_HEALTHY",
+ "message": "message from PDP"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "PdpGroup0",
+ "version": "1.2.4",
+ "description": "group description",
+ "pdpGroupState": "PASSIVE",
+ "properties": {
+ "groupProperty0": "Value of Group Property 0"
+ },
+ "pdpSubgroups": [
+ {
+ "pdpType": "APEX",
+ "supportedPolicyTypes": [
+ {
+ "name": "policy.type.0",
+ "version": "1.2.3"
+ }
+ ],
+ "policies": [
+ {
+ "name": "Policy0",
+ "version": "4.5.6"
+ }
+ ],
+ "currentInstanceCount": 123,
+ "desiredInstanceCount": 456,
+ "properties": {
+ "subgroupProperty0": "Value of sub Group Property 0"
+ },
+ "pdpInstances": [
+ {
+ "instanceId": "apex-0",
+ "pdpState": "ACTIVE",
+ "healthy": "NOT_HEALTHY",
+ "message": "message from PDP"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "PdpGroup0",
+ "version": "1.2.1",
+ "description": "group description",
+ "pdpGroupState": "PASSIVE",
+ "properties": {
+ "groupProperty0": "Value of Group Property 0"
+ },
+ "pdpSubgroups": [
+ {
+ "pdpType": "APEX",
+ "supportedPolicyTypes": [
+ {
+ "name": "policy.type.0",
+ "version": "1.2.3"
+ }
+ ],
+ "policies": [
+ {
+ "name": "Policy0",
+ "version": "4.5.6"
+ }
+ ],
+ "currentInstanceCount": 123,
+ "desiredInstanceCount": 456,
+ "properties": {
+ "subgroupProperty0": "Value of sub Group Property 0"
+ },
+ "pdpInstances": [
+ {
+ "instanceId": "apex-0",
+ "pdpState": "ACTIVE",
+ "healthy": "NOT_HEALTHY",
+ "message": "message from PDP"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "PdpGroup1",
+ "version": "1.2.1",
+ "description": "group description",
+ "pdpGroupState": "PASSIVE",
+ "properties": {
+ "groupProperty0": "Value of Group Property 0"
+ },
+ "pdpSubgroups": [
+ {
+ "pdpType": "APEX",
+ "supportedPolicyTypes": [
+ {
+ "name": "policy.type.0",
+ "version": "1.2.3"
+ }
+ ],
+ "policies": [
+ {
+ "name": "Policy0",
+ "version": "4.5.6"
+ }
+ ],
+ "currentInstanceCount": 123,
+ "desiredInstanceCount": 456,
+ "properties": {
+ "subgroupProperty0": "Value of sub Group Property 0"
+ },
+ "pdpInstances": [
+ {
+ "instanceId": "apex-0",
+ "pdpState": "ACTIVE",
+ "healthy": "NOT_HEALTHY",
+ "message": "message from PDP"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "PdpGroup1",
+ "version": "1.2.3",
+ "description": "group description",
+ "pdpGroupState": "PASSIVE",
+ "properties": {
+ "groupProperty0": "Value of Group Property 0"
+ },
+ "pdpSubgroups": [
+ {
+ "pdpType": "APEX",
+ "supportedPolicyTypes": [
+ {
+ "name": "policy.type.0",
+ "version": "1.2.3"
+ }
+ ],
+ "policies": [
+ {
+ "name": "Policy0",
+ "version": "4.5.6"
+ }
+ ],
+ "currentInstanceCount": 123,
+ "desiredInstanceCount": 456,
+ "properties": {
+ "subgroupProperty0": "Value of sub Group Property 0"
+ },
+ "pdpInstances": [
+ {
+ "instanceId": "apex-0",
+ "pdpState": "ACTIVE",
+ "healthy": "NOT_HEALTHY",
+ "message": "message from PDP"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file