summaryrefslogtreecommitdiffstats
path: root/src/test/resources/tosca/policy-yaml-to-json-with-constraints.json
diff options
context:
space:
mode:
authorVidyashree Rama <vidyashree.rama@huawei.com>2019-09-25 11:58:19 +0530
committerVidyashree Rama <vidyashree.rama@huawei.com>2019-09-25 12:00:33 +0530
commit7c2f2b8262f7fac33ec288744051e97460551361 (patch)
tree139af5b869156557842f707128dbe3a46e61d31c /src/test/resources/tosca/policy-yaml-to-json-with-constraints.json
parent34f3d17a70c3656e6bb7935187dd6b51efda0873 (diff)
Improve unit test coverage of ToscaYamlToJsonConvertor
Improve unit test coverage of ToscaYamlToJsonConvertor Change-Id: Ia5dc07288b878ac62d74313032ba2b4ee69f9c2e Issue-ID: CLAMP-510 Signed-off-by: Vidyashree Rama <vidyashree.rama@huawei.com>
Diffstat (limited to 'src/test/resources/tosca/policy-yaml-to-json-with-constraints.json')
-rw-r--r--src/test/resources/tosca/policy-yaml-to-json-with-constraints.json63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/test/resources/tosca/policy-yaml-to-json-with-constraints.json b/src/test/resources/tosca/policy-yaml-to-json-with-constraints.json
new file mode 100644
index 000000000..b2575486c
--- /dev/null
+++ b/src/test/resources/tosca/policy-yaml-to-json-with-constraints.json
@@ -0,0 +1,63 @@
+{
+ "schema": {
+ "uniqueItems": "true",
+ "format": "tabs-top",
+ "type": "array",
+ "title": "Properties with constraints",
+ "items": {
+ "type": "object",
+ "title": "Properties with constraints",
+ "required": [
+ "cpus",
+ "memSize"
+ ],
+ "properties": {
+ "appPassword": {
+ "propertyOrder": 1004,
+ "minLength": 6,
+ "title": "application password",
+ "type": "string",
+ "maxLength": 10
+ },
+ "cost": {
+ "exclusiveMaximum": 100.5,
+ "propertyOrder": 1005,
+ "type": "integer",
+ "exclusiveMinimum": 50.5
+ },
+ "keylength": {
+ "propertyOrder": 1007,
+ "type": "integer",
+ "enum": [
+ 128,
+ 256
+ ]
+ },
+ "cpus": {
+ "propertyOrder": 1001,
+ "default": 1,
+ "minLength": 1,
+ "type": "string",
+ "maxLength": 4
+ },
+ "ports": {
+ "propertyOrder": 1002,
+ "maximum": 9010,
+ "type": "integer",
+ "minimum": 9000
+ },
+ "memSize": {
+ "propertyOrder": 1003,
+ "maximum": 10,
+ "title": "memory size",
+ "type": "integer",
+ "minimum": 2
+ },
+ "algorithm": {
+ "propertyOrder": 1006,
+ "type": "string"
+ }
+ }
+ }
+ }
+}