You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ariatosca.apache.org by em...@apache.org on 2017/10/25 22:19:34 UTC
incubator-ariatosca git commit: More fixes
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-1-parser-test-suite f4f098526 -> ffb79146d
More fixes
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/ffb79146
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/ffb79146
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/ffb79146
Branch: refs/heads/ARIA-1-parser-test-suite
Commit: ffb79146d07af33a79943721afd3d8fb6674da48
Parents: f4f0985
Author: Tal Liron <ta...@gmail.com>
Authored: Tue Oct 24 14:04:40 2017 -0500
Committer: Tal Liron <ta...@gmail.com>
Committed: Wed Oct 25 17:19:28 2017 -0500
----------------------------------------------------------------------
.../simple_v1_0/definitions.py | 5 +--
.../simple_v1_0/modeling/capabilities.py | 39 +++++++++++++-----
.../simple_v1_0/modeling/interfaces.py | 35 ++++++++++------
.../simple_v1_0/modeling/parameters.py | 6 +--
requirements.in | 41 ++++++++++---------
requirements.txt | 18 +++++----
.../functions/test_function_get_artifact.py | 2 +-
.../simple_v1_0/test_imports.py | 4 +-
.../types/common/test_type_interfaces.py | 17 +++++---
.../types/common/test_type_parameters.py | 4 +-
.../common/test_type_parameters_inheritance.py | 20 ++++++----
.../node_type/test_node_type_capabilities.py | 7 ++--
.../test_node_type_relationship_interfaces.py | 42 +-------------------
tests/requirements.txt | 10 ++---
14 files changed, 125 insertions(+), 125 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/extensions/aria_extension_tosca/simple_v1_0/definitions.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/definitions.py b/extensions/aria_extension_tosca/simple_v1_0/definitions.py
index 02794e8..a7e2806 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/definitions.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/definitions.py
@@ -331,9 +331,8 @@ class InterfaceDefinition(ExtensiblePresentation):
def _validate(self, context):
super(InterfaceDefinition, self)._validate(context)
- if self.operations:
- for operation in self.operations.itervalues(): # pylint: disable=no-member
- operation._validate(context)
+ self._get_inputs(context)
+ self._get_operations(context)
@short_form_field('type')
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
index ca32dde..859e7ed 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/capabilities.py
@@ -161,7 +161,9 @@ def convert_capability_from_definition_to_assignment(context, presentation, cont
if properties is not None:
raw['properties'] = convert_parameter_definitions_to_values(context, properties)
- # TODO attributes
+ attributes = presentation.attributes
+ if attributes is not None:
+ raw['attributes'] = convert_parameter_definitions_to_values(context, attributes)
return CapabilityAssignment(name=presentation._name, raw=raw, container=container)
@@ -169,21 +171,28 @@ def convert_capability_from_definition_to_assignment(context, presentation, cont
def merge_capability_definition(context, presentation, capability_definition,
from_capability_definition):
raw_properties = OrderedDict()
+ raw_attributes = OrderedDict()
capability_definition._raw['type'] = from_capability_definition.type
- # Merge properties from type
- from_property_defintions = from_capability_definition.properties
- merge_raw_parameter_definitions(context, presentation, raw_properties, from_property_defintions,
- 'properties')
-
- # Merge our properties
+ # Merge parameters from type
merge_raw_parameter_definitions(context, presentation, raw_properties,
capability_definition.properties, 'properties')
+ merge_raw_parameter_definitions(context, presentation, raw_attributes,
+ capability_definition.attributes, 'attributes')
+
+ # Merge our parameters
+ merge_raw_parameter_definitions(context, presentation, raw_properties,
+ from_capability_definition.properties, 'properties')
+ merge_raw_parameter_definitions(context, presentation, raw_attributes,
+ from_capability_definition.attributes, 'attributes')
if raw_properties:
capability_definition._raw['properties'] = raw_properties
capability_definition._reset_method_cache()
+ if raw_attributes:
+ capability_definition._raw['attributes'] = raw_attributes
+ capability_definition._reset_method_cache()
# Merge occurrences
occurrences = from_capability_definition._raw.get('occurrences')
@@ -194,23 +203,31 @@ def merge_capability_definition(context, presentation, capability_definition,
def merge_capability_definition_from_type(context, presentation, capability_definition):
"""
- Merge ``properties`` and ``valid_source_types`` from the node type's capability definition
- over those taken from the parent node type.
+ Merge ``properties``, ``attributes``, and ``valid_source_types`` from the node type's capability
+ definition over those taken from the parent node type.
"""
raw_properties = OrderedDict()
+ raw_attributes = OrderedDict()
- # Merge properties from parent
+ # Merge parameters from parent
the_type = capability_definition._get_type(context)
type_property_defintions = the_type._get_properties(context)
+ type_attribute_defintions = the_type._get_attributes(context)
merge_raw_parameter_definitions(context, presentation, raw_properties, type_property_defintions,
'properties')
+ merge_raw_parameter_definitions(context, presentation, raw_attributes,
+ type_attribute_defintions, 'attributes')
- # Merge our properties (might override definitions in parent)
+ # Merge our parameters (might override definitions in parent)
merge_raw_parameter_definitions(context, presentation, raw_properties,
capability_definition.properties, 'properties')
+ merge_raw_parameter_definitions(context, presentation, raw_attributes,
+ capability_definition.attributes, 'attributes')
if raw_properties:
capability_definition._raw['properties'] = raw_properties
+ if raw_attributes:
+ capability_definition._raw['attributes'] = raw_attributes
# Override valid_source_types
if capability_definition._raw.get('valid_source_types') is None:
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py
index d7538c1..8fb9db8 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/interfaces.py
@@ -18,6 +18,7 @@ from aria.parser.presentation import get_locator
from aria.parser.validation import Issue
from .parameters import (coerce_parameter_value, convert_parameter_definitions_to_values)
+from .data_types import (get_type_by_name, get_primitive_data_type)
#
@@ -38,6 +39,7 @@ def get_inherited_operations(context, presentation):
# Add/merge our operations
our_operations = presentation.operations # OperationDefinition
+ print '&&&&&&&&&&&&&&'
merge_operation_definitions(context, operations, our_operations, presentation._name,
presentation, 'type')
@@ -302,23 +304,29 @@ def merge_interface(context, presentation, interface_assignment, our_interface_a
def merge_raw_input_definition(context, the_raw_input, our_input, interface_name, operation_name,
presentation, type_name):
# Check if we changed the type
- # TODO: allow a sub-type?
- input_type1 = the_raw_input.get('type')
- input_type2 = our_input.type
- if input_type1 != input_type2:
+ input_type1_name = the_raw_input.get('type')
+ input_type1 = get_type_by_name(context, input_type1_name, 'data_types')
+ if input_type1 is None:
+ input_type1 = get_primitive_data_type(input_type1_name)
+ input_type2 = our_input._get_type(context)
+ print '$$$$$$$$$$',input_type1,input_type2
+ if input_type1 is not input_type2 and \
+ (not hasattr(input_type1, '_is_descendant') or \
+ not input_type1._is_descendant(context, input_type2)):
if operation_name is not None:
context.validation.report(
- u'interface {0} "{1}" changes operation input "{2}.{3}" type from "{4}" to "{5}" '
- u'in "{6}"'
- .format(type_name, interface_name, operation_name, our_input._name, input_type1,
- input_type2, presentation._fullname),
- locator=input_type2._locator, level=Issue.BETWEEN_TYPES)
+ u'type "{0}" is not a descendant of overridden type "{1}" for input "{2}" of '
+ u'operation {3} "{4}.{5}" in {6}'
+ .format(our_input.type, input_type1_name, our_input._name, type_name,
+ interface_name, operation_name, presentation._fullname),
+ locator=our_input._locator, level=Issue.BETWEEN_TYPES)
else:
context.validation.report(
- u'interface {0} "{1}" changes input "{2}" type from "{3}" to "{4}" in "{5}"'
- .format(type_name, interface_name, our_input._name, input_type1, input_type2,
- presentation._fullname),
- locator=input_type2._locator, level=Issue.BETWEEN_TYPES)
+ u'type "{0}" is not a descendant of overridden type "{1}" for input "{2}" of '
+ u'interface {3} "{4}" in {5}'
+ .format(our_input.type, input_type1_name, our_input._name, type_name,
+ interface_name, presentation._fullname),
+ locator=our_input._locator, level=Issue.BETWEEN_TYPES)
# Merge
merge(the_raw_input, our_input._raw)
@@ -327,6 +335,7 @@ def merge_raw_input_definition(context, the_raw_input, our_input, interface_name
def merge_input_definitions(context, inputs, our_inputs, interface_name, operation_name,
presentation, type_name):
for input_name, our_input in our_inputs.iteritems():
+ print '%%%%%%%%%',input_name
if input_name in inputs:
merge_raw_input_definition(context, inputs[input_name]._raw, our_input, interface_name,
operation_name, presentation, type_name)
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/extensions/aria_extension_tosca/simple_v1_0/modeling/parameters.py
----------------------------------------------------------------------
diff --git a/extensions/aria_extension_tosca/simple_v1_0/modeling/parameters.py b/extensions/aria_extension_tosca/simple_v1_0/modeling/parameters.py
index 6a0af90..e538c26 100644
--- a/extensions/aria_extension_tosca/simple_v1_0/modeling/parameters.py
+++ b/extensions/aria_extension_tosca/simple_v1_0/modeling/parameters.py
@@ -166,12 +166,12 @@ def merge_raw_parameter_definition(context, presentation, raw_property_definitio
our_property_definition._reset_method_cache()
type2 = our_property_definition._get_type(context)
- if type1 != type2:
- if not hasattr(type1, '_is_descendant') or not type1._is_descendant(context, type2):
+ if (type1 is not type2) and \
+ (not hasattr(type1, '_is_descendant') or not type1._is_descendant(context, type2)):
context.validation.report(
u'property definition type "{0}" is not a descendant of overridden '
u'property definition type "{1}"' \
- .format(type1_name, type2._name),
+ .format(our_property_definition.type, type1_name),
locator=presentation._get_child_locator(field_name, property_name),
level=Issue.BETWEEN_TYPES)
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/requirements.in
----------------------------------------------------------------------
diff --git a/requirements.in b/requirements.in
index caeaaf3..dd27ebc 100644
--- a/requirements.in
+++ b/requirements.in
@@ -13,28 +13,27 @@
# In order to create the requirements.txt file, execute
# pip-compile --output-file requirements.txt requirements.in (pip-tools package is needed).
-requests>=2.3.0, <2.14.0
-networkx>=1.9, <1.10 # version 1.10 dropped support for Python 2.6
-retrying>=1.3.0, <1.4.0
+backports.shutil_get_terminal_size>=1, <2
blinker>1.3, <1.5
-jsonpickle>0.9.0, <=0.9.4
-ruamel.yaml>=0.11.12, <0.12.0 # version 0.12.0 dropped support for Python 2.6
-Jinja2>=2.8, <3.0
-shortuuid>=0.5, <0.6
-CacheControl[filecache]>=0.11.0, <0.13
-SQLAlchemy>=1.1.0, <1.2 # version 1.2 dropped support for Python 2.6
-wagon==0.6.0
-wheel==0.29.0 # version 0.30.0 dropped support for Python 2.6
-bottle>=0.12.0, <0.13
-setuptools>=35.0.0, <36.0.0
-click>=6.0, < 7.0
-colorama>=0.3.7, <=0.3.9
-PrettyTable>=0.7,<0.8
-click_didyoumean==0.0.3
-backports.shutil_get_terminal_size==1.0.0
-logutils==0.3.4.1
-psutil>=5.2.2, <6.0.0
+bottle>=0.12, <0.13
+CacheControl[filecache]>=0.11, <0.13
+click>=6, <7
+click_didyoumean>=0.0.3, <0.1
+colorama>=0.3, <=0.4
importlib ; python_version < '2.7'
+Jinja2>=2.8, <2.10
+jsonpickle>0.9, <=0.10
+logutils>=0.3, <0.4
+networkx>=1.9, <1.10 # version 1.10 dropped support for Python 2.6
ordereddict ; python_version < '2.7'
+PrettyTable>=0.7,<0.8
+psutil>=5.2, <5.5
+requests>=2.3, <2.19
+retrying>=1.3, <1.4
+ruamel.yaml>=0.11.12, <0.12.0 # version 0.12.0 dropped support for Python 2.6
+setuptools>=35, <37
+shortuuid>=0.5, <0.6
+SQLAlchemy>=1.1, <1.2 # version 1.2 dropped support for Python 2.6
total-ordering ; python_version < '2.7' # only one version on PyPI
-wheel<=0.29.0 ; python_version < '2.7'
+wagon>=0.6, <0.7
+wheel>=0.29, <0.30 # version 0.30.0 dropped support for Python 2.6
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/requirements.txt
----------------------------------------------------------------------
diff --git a/requirements.txt b/requirements.txt
index cbb015a..f37ccf9 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,26 +4,29 @@
#
# pip-compile --output-file ./requirements.txt ./requirements.in
#
-backports.shutil_get_terminal_size==1.0.0
+backports.shutil-get-terminal-size==1.0.0
blinker==1.4
bottle==0.12.13
cachecontrol[filecache]==0.12.3
+certifi==2017.7.27.1 # via requests
+chardet==3.0.4 # via requests
+click-didyoumean==0.0.3
click==6.7
-click_didyoumean==0.0.3
colorama==0.3.9
decorator==4.1.2 # via networkx
+idna==2.6 # via requests
importlib==1.0.4 ; python_version < "2.7"
jinja2==2.9.6
-jsonpickle==0.9.4
+jsonpickle==0.9.5
lockfile==0.12.2 # via cachecontrol
-logutils==0.3.4.1
+logutils==0.3.5
markupsafe==1.0 # via jinja2
msgpack-python==0.4.8 # via cachecontrol
networkx==1.9.1
ordereddict==1.1 ; python_version < "2.7"
prettytable==0.7.2
psutil==5.4.0
-requests==2.13.0
+requests==2.18.4
retrying==1.3.3
ruamel.ordereddict==0.4.13 # via ruamel.yaml
ruamel.yaml==0.11.15
@@ -31,8 +34,9 @@ shortuuid==0.5.0
six==1.11.0 # via retrying
sqlalchemy==1.1.14
total-ordering==0.1.0 ; python_version < "2.7"
-wagon==0.6.0
-wheel==0.29.0 ; python_version < "2.7"
+urllib3==1.22 # via requests
+wagon==0.6.1
+wheel==0.29.0
# The following packages are considered to be unsafe in a requirements file:
# setuptools
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/tests/extensions/aria_extension_tosca/simple_v1_0/functions/test_function_get_artifact.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/functions/test_function_get_artifact.py b/tests/extensions/aria_extension_tosca/simple_v1_0/functions/test_function_get_artifact.py
index 11be88a..6fa1a3c 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/functions/test_function_get_artifact.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/functions/test_function_get_artifact.py
@@ -61,7 +61,7 @@ topology_template:
""").assert_success()
-@pytest.mark.skip(reason='not implemented')
+@pytest.mark.xfail(reason='not yet implemented')
def test_functions_get_artifact_unknown(parser):
parser.parse_literal("""
tosca_definitions_version: tosca_simple_yaml_1_0
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/tests/extensions/aria_extension_tosca/simple_v1_0/test_imports.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/test_imports.py b/tests/extensions/aria_extension_tosca/simple_v1_0/test_imports.py
index 9636b7b..07a0d9b 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/test_imports.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/test_imports.py
@@ -130,7 +130,7 @@ topology_template:
# Repository
-@pytest.mark.skip(reason='not yet supported')
+@pytest.mark.xfail(reason='not yet implemented')
def test_import_repository(parser, repository):
parser.parse_literal("""
tosca_definitions_version: tosca_simple_yaml_1_0
@@ -149,7 +149,7 @@ topology_template:
# Namespace
-@pytest.mark.skip(reason='not yet supported')
+@pytest.mark.xfail(reason='not yet implemented')
def test_import_namespace(parser, repository):
parser.parse_literal("""
tosca_definitions_version: tosca_simple_yaml_1_0
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/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 3c7dc20..5d17089 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
@@ -59,6 +59,12 @@ PERMUTATIONS = (
('relationship', 'node')
)
+PERMUTATIONS_NO_RELATIONSHIP = tuple(
+ (macros, name)
+ for macros, name in PERMUTATIONS
+ if macros != 'relationship'
+)
+
# Interfaces section
@@ -152,27 +158,26 @@ MyInterface:
""", dict(name=name)).assert_success()
-@pytest.mark.skip(reason='fix for node.relationship')
-@pytest.mark.parametrize('macros,name', PERMUTATIONS)
+# We are skipping relationship interfaces, because node requirements can be overridden completely
+@pytest.mark.parametrize('macros,name', PERMUTATIONS_NO_RELATIONSHIP)
def test_type_interface_type_override_bad(parser, macros, name):
parser.parse_literal(MACROS[macros] + """
tosca_definitions_version: tosca_simple_yaml_1_0
{{- additions() }}
interface_types:
MyType1: {}
- MyType2:
- derived_from: MyType1
+ MyType2: {}
{{ name }}_types:
MyType1:
{%- call interfaces() %}
MyInterface:
- type: MyType2
+ type: MyType1
{% endcall %}
MyType2:
derived_from: MyType1
{%- call interfaces() %}
MyInterface:
- type: MyType1
+ type: MyType2
{% endcall %}
""", dict(name=name)).assert_failure()
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/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 ff24c81..3cbf47c 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
@@ -131,7 +131,7 @@ interface_types:
interfaces:
my_interface:
type: MyType
- {{ parameter_section }}: {{ caller()|indent(20) }}
+ {{ parameter_section }}: {{ caller()|indent(18) }}
{%- endmacro %}
"""
@@ -162,7 +162,7 @@ interface_types:
my_interface:
type: MyType
my_operation:
- {{ parameter_section }}: {{ caller()|indent(22) }}
+ {{ parameter_section }}: {{ caller()|indent(20) }}
{%- endmacro %}
"""
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters_inheritance.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters_inheritance.py b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters_inheritance.py
index e8a72f4..5872ab0 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters_inheritance.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/common/test_type_parameters_inheritance.py
@@ -34,6 +34,12 @@ PERMUTATIONS = tuple(
if name is not None
)
+PERMUTATIONS_NO_RELATIONSHIP = tuple(
+ (macros, name, parameter_section)
+ for macros, name, parameter_section in PERMUTATIONS
+ if macros not in ('relationship-interface', 'relationship-operation')
+)
+
@pytest.mark.parametrize('macros,name,parameter_section', PERMUTATIONS)
def test_type_parameter_add(parser, macros, name, parameter_section):
@@ -68,7 +74,6 @@ my_parameter:
""", dict(name=name, parameter_section=parameter_section)).assert_success()
-@pytest.mark.skip(reason='fix for node.capability and node.relationship')
@pytest.mark.parametrize('macros,name,parameter_section', PERMUTATIONS)
def test_type_parameter_type_override(parser, macros, name, parameter_section):
parser.parse_literal(MACROS[macros] + """
@@ -92,25 +97,26 @@ my_parameter:
""", dict(name=name, parameter_section=parameter_section)).assert_success()
-@pytest.mark.skip(reason='fix for node.capability and node.relationship')
-@pytest.mark.parametrize('macros,name,parameter_section', PERMUTATIONS)
+# We are skipping relationship interfaces, because node requirements can be overridden completely
+@pytest.mark.xfail
+#@pytest.mark.parametrize('macros,name,parameter_section', (('nested','interface','inputs'),))
+#@pytest.mark.parametrize('macros,name,parameter_section', PERMUTATIONS_NO_RELATIONSHIP)
def test_type_parameter_type_override_bad(parser, macros, name, parameter_section):
parser.parse_literal(MACROS[macros] + """
tosca_definitions_version: tosca_simple_yaml_1_0
{{- additions() }}
data_types:
MyDataType1: {}
- MyDataType2:
- derived_from: MyDataType1
+ MyDataType2: {}
{%- if name != 'data' %}
{{ name }}_types:
{%- endif %}
{%- call parameters('MyType1') %}
my_parameter:
- type: MyDataType2
+ type: MyDataType1
{% endcall %}
{%- call parameters('MyType2', 'MyType1') %}
my_parameter:
- type: MyDataType1
+ type: MyDataType2
{% endcall %}
""", dict(name=name, parameter_section=parameter_section)).assert_failure()
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py
index c3491d1..5904a89 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_capabilities.py
@@ -158,18 +158,17 @@ def test_node_type_capability_type_override_bad(parser):
tosca_definitions_version: tosca_simple_yaml_1_0
capability_types:
MyType1: {}
- MyType2:
- derived_from: MyType1
+ MyType2: {}
node_types:
MyType1:
capabilities:
my_capability:
- type: MyType2
+ type: MyType1
MyType2:
derived_from: MyType1
capabilities:
my_capability:
- type: MyType1
+ type: MyType2
""").assert_failure()
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_relationship_interfaces.py
----------------------------------------------------------------------
diff --git a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_relationship_interfaces.py b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_relationship_interfaces.py
index ee34a3a..257fab1 100644
--- a/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_relationship_interfaces.py
+++ b/tests/extensions/aria_extension_tosca/simple_v1_0/types/node_type/test_node_type_relationship_interfaces.py
@@ -18,8 +18,6 @@
These tests are in addition to those in common/test_type_interface.py.
"""
-import pytest
-
# Type
@@ -32,8 +30,7 @@ relationship_types:
MyType: {}
interface_types:
MyType1: {}
- MyType2:
- derived_from: MyType1
+ MyType2: {}
node_types:
MyType1:
requirements:
@@ -53,40 +50,5 @@ node_types:
type: MyType
interfaces:
my_interface:
- type: MyType2
+ type: MyType2 # overriding the requirement has no restrictions
""").assert_success()
-
-
-@pytest.mark.skip(reason='fix')
-def test_node_type_relationship_interface_type_override_bad(parser):
- parser.parse_literal("""
-tosca_definitions_version: tosca_simple_yaml_1_0
-capability_types:
- MyType: {}
-relationship_types:
- MyType: {}
-interface_types:
- MyType1: {}
- MyType2:
- derived_from: MyType1
-node_types:
- MyType1:
- requirements:
- - my_requirement:
- capability: MyType
- relationship:
- type: MyType
- interfaces:
- my_interface:
- type: MyType2
- MyType2:
- derived_from: MyType1
- requirements:
- - my_requirement:
- capability: MyType
- relationship:
- type: MyType
- interfaces:
- my_interface:
- type: MyType1
-""").assert_failure()
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/ffb79146/tests/requirements.txt
----------------------------------------------------------------------
diff --git a/tests/requirements.txt b/tests/requirements.txt
index fbc7124..a958737 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -10,13 +10,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-testtools==2.3.0
fasteners==0.14.1
sh==1.12.14
-tornado==4.3 # last release to support Python 2.6
mock==2.0.0
pylint==1.6.5 # see ARIA-314 about upgrading to 1.7
-pytest==3.2.2
+pytest==3.2.3
pytest-cov==2.5.1
-pytest-mock==1.6.2
-pytest-xdist==1.20.0
+pytest-mock==1.6.3
+pytest-xdist==1.20.1
+testtools==2.3.0
+tornado==4.3 # last release to support Python 2.6