aboutsummaryrefslogtreecommitdiffstats
path: root/applications/common/src/test/resources
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-11-04 16:18:08 -0500
committerPamela Dragosh <pdragosh@research.att.com>2019-11-12 18:48:04 -0500
commitfe3a8ec467beae89bca9d10b8b5b39f98c81ca01 (patch)
tree284c92033a8a504c46615ee26be6e7955938488f /applications/common/src/test/resources
parent1bedb591cc68c10c7db916fda8a3f02d67c2314d (diff)
Implement closest match algorithm
Needed to add more obligations, which make it easier to scan through obligations and be able to pull information about the policy. Adding weight as an obligation for Optimization policies in order to implement "closest match" algorithm. Moved Obligation to a support class. Added JUnit code coverage on the translator classes. Split some methods up to reduce complexity via sonar. Issue-ID: POLICY-2066 Change-Id: Ibb13d2dc0a63ab2a6d585b0697a0c1d129fa8f7b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/common/src/test/resources')
-rw-r--r--applications/common/src/test/resources/test.policy.bad.json17
-rw-r--r--applications/common/src/test/resources/test.policy.json21
2 files changed, 38 insertions, 0 deletions
diff --git a/applications/common/src/test/resources/test.policy.bad.json b/applications/common/src/test/resources/test.policy.bad.json
new file mode 100644
index 00000000..6bc06c3b
--- /dev/null
+++ b/applications/common/src/test/resources/test.policy.bad.json
@@ -0,0 +1,17 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
+ "topology_template": {
+ "policies": [
+ {
+ "Test.policy": {
+ "type": "onap.policies.Test",
+ "type_version": "1.0.0",
+ "version": "1.0.0",
+ "properties": {
+ "foo": "bar"
+ }
+ }
+ }
+ ]
+ }
+}
diff --git a/applications/common/src/test/resources/test.policy.json b/applications/common/src/test/resources/test.policy.json
new file mode 100644
index 00000000..f1529387
--- /dev/null
+++ b/applications/common/src/test/resources/test.policy.json
@@ -0,0 +1,21 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_0_0",
+ "topology_template": {
+ "policies": [
+ {
+ "Test.policy": {
+ "type": "onap.policies.Test",
+ "type_version": "1.0.0",
+ "version": "1.0.0",
+ "metadata": {
+ "policy-id": "Test.policy",
+ "policy-version": 1
+ },
+ "properties": {
+ "foo": "bar"
+ }
+ }
+ }
+ ]
+ }
+}