summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiaodong shang <shang.xiaodong@zte.com.cn>2017-07-17 08:01:46 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-07-17 08:01:46 +0000
commit859e2826074aa51e0334d4607ccfcde5972e882e (patch)
tree8c7bed4355c1c6f41f09989bf3b57067f83a984e
parent30c5870f7cf3157f997b159cf25bb9cbf1117060 (diff)
parent11b868ee612861bbd0d0ded3b3c2dd43cee5dacc (diff)
Merge "Add more test for nested import list"
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_test_kibana.yaml3
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/data/test_instance_nested_imports.yaml4
-rw-r--r--tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py3
3 files changed, 9 insertions, 1 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_test_kibana.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_test_kibana.yaml
new file mode 100644
index 0000000..c8675c6
--- /dev/null
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/custom_types/nested_test_kibana.yaml
@@ -0,0 +1,3 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+ - custom_types/kibana.yaml
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/data/test_instance_nested_imports.yaml b/tosca2heat/tosca-parser/toscaparser/tests/data/test_instance_nested_imports.yaml
index 6aa9307..a130e49 100644
--- a/tosca2heat/tosca-parser/toscaparser/tests/data/test_instance_nested_imports.yaml
+++ b/tosca2heat/tosca-parser/toscaparser/tests/data/test_instance_nested_imports.yaml
@@ -5,6 +5,7 @@ description: >
imports:
- wordpress: custom_types/nested_test_wordpress.yaml
+ - custom_types/nested_test_kibana.yaml
topology_template:
@@ -20,3 +21,6 @@ topology_template:
logstash:
type: tosca.nodes.SoftwareComponent.Logstash
+
+ kibana:
+ type: tosca.nodes.SoftwareComponent.Kibana
diff --git a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py
index fac8687..af35cfb 100644
--- a/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py
+++ b/tosca2heat/tosca-parser/toscaparser/tests/test_toscatpl.py
@@ -510,7 +510,8 @@ class ToscaTemplateTest(TestCase):
os.path.dirname(os.path.abspath(__file__)),
"data/test_instance_nested_imports.yaml")
tosca = ToscaTemplate(tosca_tpl)
- expected_custom_types = ['tosca.nodes.WebApplication.WordPress',
+ expected_custom_types = ['tosca.nodes.SoftwareComponent.Kibana',
+ 'tosca.nodes.WebApplication.WordPress',
'test_namespace_prefix.Rsyslog',
'Test2ndRsyslogType',
'test_2nd_namespace_prefix.Rsyslog',