ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From emblempar...@apache.org
Subject [14/14] incubator-ariatosca git commit: Rebase on master and enable skipped tests
Date Mon, 11 Sep 2017 19:33:48 GMT
Rebase on master and enable skipped tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/d5fe4f75
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/d5fe4f75
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/d5fe4f75

Branch: refs/heads/ARIA-1-parser-test-suite
Commit: d5fe4f758d8c272d2e1917e1535f99eb0f6fd8a5
Parents: 4e87657
Author: Tal Liron <tal.liron@gmail.com>
Authored: Mon Sep 11 14:32:25 2017 -0500
Committer: Tal Liron <tal.liron@gmail.com>
Committed: Mon Sep 11 14:32:25 2017 -0500

----------------------------------------------------------------------
 .../simple_v1_0/data_types.py                   |  4 ++--
 .../templates/test_template_parameters.py       |  1 -
 .../types/common/test_type_interfaces.py        |  5 ++--
 .../types/common/test_type_parameters.py        | 25 +++++++++++---------
 .../node_types/test_node_type_capabilities.py   |  7 +++---
 .../test_node_type_relationship_interfaces.py   |  8 +++----
 .../simple_v1_0/types/test_interface_type.py    |  1 -
 7 files changed, 25 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d5fe4f75/extensions/aria_extension_tosca/simple_v1_0/data_types.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/data_types.py b/extensions/aria_extension_tosca/simple_v1_0/data_types.py
index 640ed33..05666fd 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/data_types.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/data_types.py
@@ -176,7 +176,7 @@ class Version(object):
 
     def __init__(self, entry_schema, constraints, value, aspect): # pylint: disable=unused-argument
         str_value = unicode(value)
-        match = re.match(Version.REGULAR, str_value, flags=re.UNICODE)
+        match = re.match(Version.REGEX, str_value, flags=re.UNICODE)
         if match is None:
             raise ValueError(
                 'version must be formatted as <major_version>.<minor_version>'
@@ -373,7 +373,7 @@ class Scalar(object):
 
     def __init__(self, entry_schema, constraints, value, aspect): # pylint: disable=unused-argument
         str_value = unicode(value)
-        match = re.match(self.REGULAR, str_value, flags=re.UNICODE) # pylint: disable=no-member
+        match = re.match(self.REGEX, str_value, flags=re.UNICODE) # pylint: disable=no-member
         if match is None:
             raise ValueError('scalar must be formatted as <scalar> <unit>: {0}'
                              .format(safe_repr(value)))

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d5fe4f75/tests/extensions/aria_extension_tosca/simple_v1_0/templates/test_template_parameters.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/templates/test_template_parameters.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/templates/test_template_parameters.py
index a0d536f..b503710 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/templates/test_template_parameters.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/templates/test_template_parameters.py
@@ -23,7 +23,6 @@ from .. import data
 
 # Required properties
 
-@pytest.mark.skip(reason='fixed in ARIA-351')
 @pytest.mark.parametrize('name,type_name', itertools.product(
     data.TEMPLATE_NAMES,
     data.PARAMETER_TYPE_NAMES

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d5fe4f75/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_interfaces.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_interfaces.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_interfaces.py
index 50f0c2e..077958b 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_interfaces.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_interfaces.py
@@ -95,7 +95,6 @@ interface_types:
 
 # Type
 
-@pytest.mark.skip(reason='fixed in ARIA-351')
 @pytest.mark.parametrize('name', TYPE_NAMES)
 def test_type_interface_type_override(parser, name):
     parser.parse_literal("""
@@ -103,7 +102,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 interface_types:
   MyType1: {}
   MyType2:
-    derived_form: MyType1
+    derived_from: MyType1
 {{ name }}_types:
   MyType1:
     interfaces:
@@ -124,7 +123,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 interface_types:
   MyType1: {}
   MyType2:
-    derived_form: MyType1
+    derived_from: MyType1
 {{ name }}_types:
   MyType1:
     interfaces:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d5fe4f75/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters.py
index 82da830..6449b87 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters.py
@@ -383,25 +383,26 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 """, dict(name=name, parameter_section=parameter_section)).assert_success()
 
 
-@pytest.mark.skip(reason='fixed in ARIA-351')
 @pytest.mark.parametrize('name,parameter_section', data.PARAMETER_SECTIONS)
 def test_type_parameter_type_override(parser, name, parameter_section):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
 data_types:
-  MyType1: {}
-  MyType2:
-    derived_from: MyType1
+  MyDataType1: {}
+  MyDataType2:
+    derived_from: MyDataType1
+{%- if name != 'data' %}
 {{ name }}_types:
+{%- endif %}
   MyType1:
     {{ parameter_section }}:
       my_parameter:
-        type: MyType1
+        type: MyDataType1
   MyType2:
     derived_from: MyType1
     {{ parameter_section }}:
       my_parameter:
-        type: MyType2
+        type: MyDataType2
 """, dict(name=name, parameter_section=parameter_section)).assert_success()
 
 
@@ -410,17 +411,19 @@ def test_type_parameter_type_override_bad(parser, name, parameter_section):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
 data_types:
-  MyType1: {}
-  MyType2:
-    derived_from: MyType1
+  MyDataType1: {}
+  MyDataType2:
+    derived_from: MyDataType1
+{%- if name != 'data' %}
 {{ name }}_types:
+{%- endif %}
   MyType1:
     {{ parameter_section }}:
       my_parameter:
-        type: MyType2
+        type: MyDataType2
   MyType2:
     derived_from: MyType1
     {{ parameter_section }}:
       my_parameter:
-        type: MyType1
+        type: MyDataType1
 """, dict(name=name, parameter_section=parameter_section)).assert_failure()

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d5fe4f75/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_capabilities.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_capabilities.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_capabilities.py
index 345fa49..a247695 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_capabilities.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_capabilities.py
@@ -89,7 +89,6 @@ node_types:
 """).assert_failure()
 
 
-@pytest.mark.skip(reason='fixed in ARIA-351')
 def test_node_type_capability_type_override(parser):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0
@@ -252,7 +251,6 @@ node_types:
 """, dict(parameter_section=parameter_section)).assert_success()
 
 
-@pytest.mark.skip(reason='fixed in ARIA-351')
 @pytest.mark.parametrize('parameter_section', data.PARAMETER_SECTION_NAMES)
 def test_node_type_capability_parameter_type_override(parser, parameter_section):
     parser.parse_literal("""
@@ -260,7 +258,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 data_types:
   MyType1: {}
   MyType2:
-    derived_from: {}
+    derived_from: MyType1
 capability_types:
   MyType:
     {{ parameter_section }}:
@@ -277,6 +275,7 @@ node_types:
 """, dict(parameter_section=parameter_section)).assert_success()
 
 
+@pytest.mark.skip(reason='fix')
 @pytest.mark.parametrize('parameter_section', data.PARAMETER_SECTION_NAMES)
 def test_node_type_capability_parameter_type_override_bad(parser, parameter_section):
     parser.parse_literal("""
@@ -284,7 +283,7 @@ tosca_definitions_version: tosca_simple_yaml_1_0
 data_types:
   MyType1: {}
   MyType2:
-    derived_from: {}
+    derived_from: MyType1
 capability_types:
   MyType:
     {{ parameter_section }}:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d5fe4f75/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_relationship_interfaces.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_relationship_interfaces.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_relationship_interfaces.py
index 358d78e..9db28dc 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_relationship_interfaces.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_types/test_node_type_relationship_interfaces.py
@@ -132,7 +132,7 @@ relationship_types:
 interface_types:
   MyType1: {}
   MyType2:
-    derived_form: MyType1
+    derived_from: MyType1
 node_types:
   MyType:
     requirements:
@@ -156,7 +156,7 @@ relationship_types:
 interface_types:
   MyType1: {}
   MyType2:
-    derived_form: MyType1
+    derived_from: MyType1
 node_types:
   MyType1:
     requirements:
@@ -194,7 +194,7 @@ relationship_types:
 interface_types:
   MyType1: {}
   MyType2:
-    derived_form: MyType1
+    derived_from: MyType1
 node_types:
   MyType:
     requirements:
@@ -219,7 +219,7 @@ relationship_types:
 interface_types:
   MyType1: {}
   MyType2:
-    derived_form: MyType1
+    derived_from: MyType1
 node_types:
   MyType1:
     requirements:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d5fe4f75/tests/extensions/aria_extension_tosca/simple_v1_0/types/test_interface_type.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/test_interface_type.py
b/tests/extensions/aria_extension_tosca/simple_v1_0/types/test_interface_type.py
index 9d41f97..18e93d3 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/test_interface_type.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/test_interface_type.py
@@ -82,7 +82,6 @@ interface_types:
 """).assert_success()
 
 
-@pytest.mark.skip(reason='fixed in ARIA-351')
 def test_interface_type_inputs_type_override_derived(parser):
     parser.parse_literal("""
 tosca_definitions_version: tosca_simple_yaml_1_0


Mime
View raw message