aboutsummaryrefslogtreecommitdiffstats
path: root/applications/optimization/src/test/resources/bad-subscriber-policies.yaml
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-03-10 07:54:05 -0400
committerPamela Dragosh <pdragosh@research.att.com>2020-03-10 09:37:44 -0400
commitb0a27abb7d8812d5a73f65645df0bdbf06e4d64d (patch)
tree966f321e7d7259a6816ebeac28680ca1571752b6 /applications/optimization/src/test/resources/bad-subscriber-policies.yaml
parenta0ad29cdb6d6f541aac59f9e265f79d3ad085560 (diff)
Fix optimization bug add coverage plus
Fix a NPE bug and add more code coverage. Also is missing returning of context details for subscriber policies. This code is a bit ad-hoc and there is a separate JIRA POLICY-2147 to support re-factoring this codebase. Added scanning for advice to be returned. For optimization, because of the need for some changes in XACML github dependency, we are stuck with a little narly code to get it to fully work. POLICY-2417 is created to address this in Guilen. Upgraded to released XACML artifact - this has been tested locally for a few weeks with naming, guard and this optimzation code. It removed Jackson in lieu of Json, cleaned up some security fixes, upgraded dependencies, and added more code coverage. Issue-ID: POLICY-2066 Change-Id: I3cae99de265c815200ec2ce71e471338772bdb5b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/optimization/src/test/resources/bad-subscriber-policies.yaml')
-rw-r--r--applications/optimization/src/test/resources/bad-subscriber-policies.yaml34
1 files changed, 34 insertions, 0 deletions
diff --git a/applications/optimization/src/test/resources/bad-subscriber-policies.yaml b/applications/optimization/src/test/resources/bad-subscriber-policies.yaml
new file mode 100644
index 00000000..db638fb8
--- /dev/null
+++ b/applications/optimization/src/test/resources/bad-subscriber-policies.yaml
@@ -0,0 +1,34 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+topology_template:
+ policies:
+ -
+ missing-subscriberProperties:
+ type: onap.policies.optimization.service.SubscriberPolicy
+ version: 1.0.0
+ type_version: 1.0.0
+ properties:
+ scope: []
+ services: [vCPE]
+ identity: subscriber_vCPE
+ -
+ missing-subscriberName:
+ type: onap.policies.optimization.service.SubscriberPolicy
+ version: 1.0.0
+ type_version: 1.0.0
+ properties:
+ scope: []
+ services: [vCPE]
+ identity: subscriber_vCPE
+ subscriberProperties:
+ missingName: foo
+ -
+ missing-subscriberRole:
+ type: onap.policies.optimization.service.SubscriberPolicy
+ version: 1.0.0
+ type_version: 1.0.0
+ properties:
+ scope: []
+ services: [vCPE]
+ identity: subscriber_vCPE
+ subscriberProperties:
+ subscriberName: foo \ No newline at end of file