diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-10 07:54:05 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-10 09:37:44 -0400 |
commit | b0a27abb7d8812d5a73f65645df0bdbf06e4d64d (patch) | |
tree | 966f321e7d7259a6816ebeac28680ca1571752b6 /applications/optimization/src/test/resources | |
parent | a0ad29cdb6d6f541aac59f9e265f79d3ad085560 (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')
-rw-r--r-- | applications/optimization/src/test/resources/bad-subscriber-policies.yaml | 34 | ||||
-rw-r--r-- | applications/optimization/src/test/resources/test-optimization-policies.yaml (renamed from applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml) | 1 |
2 files changed, 34 insertions, 1 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 diff --git a/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml b/applications/optimization/src/test/resources/test-optimization-policies.yaml index fb848637..f893158b 100644 --- a/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml +++ b/applications/optimization/src/test/resources/test-optimization-policies.yaml @@ -255,7 +255,6 @@ topology_template: properties: scope: [] services: [vCPE] -# resources: [vGMuxInfra, vG] geography: [US, INTERNATIONAL] identity: vCPE_Query_Policy queryProperties: |