aboutsummaryrefslogtreecommitdiffstats
path: root/applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-03-18 07:50:22 -0400
committerPamela Dragosh <pdragosh@research.att.com>2020-03-19 08:03:24 -0400
commit3b755ec2e3d9776980236db6ba754ae6b7cc2402 (patch)
treed9503508e748d9b6f516a2665461b32c66ee2ac0 /applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml
parent6b4f9b69bc4acec28da8ef50b8f234d0182f0d78 (diff)
Re-factor matchable to reduce complexity
This solution is much cleaner than what is in StdMatchableTranslator. Over 90% code coverage on it - utilizes a callback to retrieve DataType and PolicyTypes. Support for missing timestamp TOSCA type. Also can do a better job differentiating between a property contained in the policy vs a schema. Changed StdMatchableTranslator to utilize these classes. And removed the old spaghetti. Added some JUnit coverage for ToscaPolicyTranslatorUtils. Removed duplicate code in the XACML Native Exception classes. Issue-ID: POLICY-2242 Change-Id: I18f898d9e65f6da28e3b27517d40f8d389de18a0 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml')
-rw-r--r--applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml38
1 files changed, 26 insertions, 12 deletions
diff --git a/applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml b/applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml
index 80f72b2f..daffc2cb 100644
--- a/applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml
+++ b/applications/common/src/test/resources/matchable/test.policies.input.tosca.yaml
@@ -1,4 +1,4 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
+tosca_definitions_version: tosca_simple_yaml_1_1_0
topology_template:
policies:
- Test.policy:
@@ -13,24 +13,38 @@ topology_template:
baseMatch: base Match
middleNoMatch: Do not match the middle
middleMatch: middle Match
- nonmatachableString: I am NON matchable
+ nonmatchableString: I am NON matchable
matchableString: I should be matched
- nonmatachableInteger: 0
- matachableInteger: 1000
- nonmatachableFloat: 0.0
+ nonmatchableInteger: 0
+ matchableInteger: 1000
+ nonmatchableFloat: 0.0
matchableFloat: 1.1
- nonmatachableBoolean: false
- matachableBoolean: true
+ nonmatchableBoolean: false
+ matchableBoolean: true
+ nonmatchableTimestamp: 2019-01-01T00:00:00Z
+ matchableTimestamp: 2020-01-01T00:00:00Z
nonmatchableListInteger: {0, 1, 2}
matchableListString:
- match A
- match B
- propertyOneMap:
+ matchableMapString:
+ test1: matchableMap1
+ test2: matchableMap2
+ nonmatchableMapString:
+ risk: potential risk of matching
+ matchableDataType:
+ zeroStringMatchable: zero Match
+ zeroBooleanMatchable: true
+ zeroFloatMatchable: 9.9
+ zeroIntegerMatchable: 1000
+ zeroTimestampMatchable: 2020-01-01T23:59:59Z
oneString: One is NOT matchable
oneStringMatchable: One should be matched
- propertyTwoList:
+ propertyTwoListOfDatatype:
- twoString: Two is NOT matchable
twoStringMatchable: Two should be matched
- propertyThreeMap:
- threeString: Three is NOT matchable
- threeStringMatchable: Three should be matched \ No newline at end of file
+ twoIntegerMatchable: 55
+ propertyThreeDatatype:
+ myThree:
+ threeStringMatchable: Three should match
+ threeIntegerMatchable: 66 \ No newline at end of file