aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichal Jagiello <michal.jagiello@t-mobile.pl>2022-01-25 14:20:34 +0000
committerMichal Jagiello <michal.jagiello@t-mobile.pl>2022-01-27 12:03:46 +0000
commit9cc10c174cc0be43df44f27fd9a43bb8675695a9 (patch)
tree538bb76d3338a25db67bdf47379e3142d0429915 /tests
parentb1112188466a5712cd41f1a88b5f4bcf31949d15 (diff)
Update properties of the SDC models
Issue-ID: INT-2053 Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl> Change-Id: I44ea3ed17948c37698aaa1d2c3a5b83011e0b90a Author: Theo Schönen <H.Schoenen@telekom.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_service_resource.py8
-rw-r--r--tests/test_validator.py31
2 files changed, 36 insertions, 3 deletions
diff --git a/tests/test_service_resource.py b/tests/test_service_resource.py
index f664676..5a18f54 100644
--- a/tests/test_service_resource.py
+++ b/tests/test_service_resource.py
@@ -6,6 +6,14 @@ from onap_data_provider.resources.service_resource import ServiceResource
SERVICE_RESOURCE_DATA = {
"name": "test",
+ "inputs": [
+ {"name": "itest", "type": "string", "value": "itest"},
+ {"name": "itest1", "type": "boolean"},
+ ],
+ "properties": [
+ {"name": "test", "type": "string", "value": "test"},
+ {"name": "test1", "type": "boolean"},
+ ],
}
diff --git a/tests/test_validator.py b/tests/test_validator.py
index ad291a9..f0c7273 100644
--- a/tests/test_validator.py
+++ b/tests/test_validator.py
@@ -82,6 +82,27 @@ def test_validator_vsps():
validator.validate(VersionsEnum.V1_0, input_data)
+def test_validator_vnf():
+ validator = Validator()
+ input_data = {
+ "vnfs": [
+ {
+ "vnf": {
+ "name": "test",
+ "vsp": "testvsp",
+ "inputs": [
+ {"name": "itest", "type": "string", "value": "itest"},
+ {"name": "itest1", "type": "boolean"},
+ {"name": "itest2", "value": True},
+ ],
+ }
+ }
+ ]
+ }
+ validator.validate(VersionsEnum.V1_0, input_data)
+ validator.validate(VersionsEnum.V1_1, input_data)
+
+
def test_validator_service():
validator = Validator()
input_data = {
@@ -91,11 +112,15 @@ def test_validator_service():
"name": "test",
"resources": [
{"name": "test", "type": "test"},
- {"name": "test1", "type": "test2"},
+ {
+ "name": "test1",
+ "type": "test2",
+ "properties": [{"name": "test0", "value": "test1"}],
+ },
],
"properties": [
- {"name": "test", "type": "test", "value": "test"},
- {"name": "test1", "type": "test1"},
+ {"name": "test", "type": "string", "value": "test"},
+ {"name": "test1", "type": "boolean"},
],
}
}