ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIA-105) Integrate new models into parser
Date Mon, 20 Mar 2017 16:09:41 GMT

    [ https://issues.apache.org/jira/browse/ARIA-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15932931#comment-15932931
] 

ASF GitHub Bot commented on ARIA-105:
-------------------------------------

Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/72#discussion_r106943383
  
    --- Diff: tests/modeling/test_models.py ---
    @@ -486,83 +472,79 @@ def test_deployment_update_step_order(self):
             assert not add_node < None
     
     
    -class TestDeploymentModification(object):
    +class TestServiceModification(object):
         @pytest.mark.parametrize(
             'is_valid, context, created_at, ended_at, modified_node_templates, nodes, status',
             [
    -            (False, m_cls, now, now, {}, {}, ServiceInstanceModification.STARTED),
    -            (False, {}, m_cls, now, {}, {}, ServiceInstanceModification.STARTED),
    -            (False, {}, now, m_cls, {}, {}, ServiceInstanceModification.STARTED),
    -            (False, {}, now, now, m_cls, {}, ServiceInstanceModification.STARTED),
    -            (False, {}, now, now, {}, m_cls, ServiceInstanceModification.STARTED),
    +            (False, m_cls, now, now, {}, {}, ServiceModification.STARTED),
    +            (False, {}, m_cls, now, {}, {}, ServiceModification.STARTED),
    +            (False, {}, now, m_cls, {}, {}, ServiceModification.STARTED),
    +            (False, {}, now, now, m_cls, {}, ServiceModification.STARTED),
    +            (False, {}, now, now, {}, m_cls, ServiceModification.STARTED),
                 (False, {}, now, now, {}, {}, m_cls),
     
    -            (True, {}, now, now, {}, {}, ServiceInstanceModification.STARTED),
    -            (True, {}, now, None, {}, {}, ServiceInstanceModification.STARTED),
    -            (True, {}, now, now, None, {}, ServiceInstanceModification.STARTED),
    -            (True, {}, now, now, {}, None, ServiceInstanceModification.STARTED),
    +            (True, {}, now, now, {}, {}, ServiceModification.STARTED),
    +            (True, {}, now, None, {}, {}, ServiceModification.STARTED),
    +            (True, {}, now, now, None, {}, ServiceModification.STARTED),
    +            (True, {}, now, now, {}, None, ServiceModification.STARTED),
             ]
         )
    -    def test_deployment_modification_model_creation(
    -            self, service_instance_storage, is_valid, context, created_at, ended_at,
    -            modified_node_templates, nodes, status):
    -        deployment_modification = _test_model(
    +    def test_service_modification_model_creation(self, service_storage, is_valid, context,
    +                                                 created_at, ended_at, modified_node_templates,
    +                                                 nodes, status):
    +        service_modification = _test_model(
                 is_valid=is_valid,
    -            storage=service_instance_storage,
    -            model_cls=ServiceInstanceModification,
    +            storage=service_storage,
    +            model_cls=ServiceModification,
                 model_kwargs=dict(
    -                service_instance=service_instance_storage.service_instance.list()[0],
    +                service=service_storage.service.list()[0],
                     context=context,
                     created_at=created_at,
                     ended_at=ended_at,
    -                modified_nodes=modified_node_templates,
    -                node_instances=nodes,
    +                modified_node_templates=modified_node_templates,
    +                nodes=nodes,
                     status=status,
                 ))
             if is_valid:
    -            assert deployment_modification.service_instance == \
    -                   service_instance_storage.service_instance.list()[0]
    +            assert service_modification.service == \
    +                   service_storage.service.list()[0]
     
     
     class TestNodeTemplate(object):
         @pytest.mark.parametrize(
    -        'is_valid, name, default_instances, max_instances, min_instances, plugins, properties,
'
    -        'type_name, type_hierarchy',
    +        'is_valid, name, default_instances, max_instances, min_instances, plugin_specifications,
'
    +        'properties',
             [
    -            (False, m_cls, 1, 1, 1, [], [], 'type', []),
    -            (False, 'name', m_cls, 1, 1, [], [], 'type', []),
    -            (False, 'name', 1, m_cls, 1, [], [], 'type', []),
    -            (False, 'name', 1, 1, m_cls, [], [], 'type', []),
    -            (False, 'name', 1, 1, 1, m_cls, [], 'type', []),
    -            (False, 'name', 1, 1, 1, [], [], m_cls, []),
    -            (False, 'name', 1, 1, 1, [], [], 'type', m_cls),
    -            #
    -            (True, 'name', 1, 1, 1, [], [], 'type', []),
    -            (True, 'name', 1, 1, 1, None, [], 'type', []),
    -            (True, 'name', 1, 1, 1, [], [], 'type', None),
    +            (False, m_cls, 1, 1, 1, {}, {}),
    +            (False, 'name', m_cls, 1, 1, {}, {}),
    +            (False, 'name', 1, m_cls, 1, {}, {}),
    +            (False, 'name', 1, 1, m_cls, {}, {}),
    +            (False, 'name', 1, 1, 1, m_cls, {}),
    +            (False, 'name', 1, 1, 1, None, {}),
    +
    +            (True, 'name', 1, 1, 1, {}, {}),
    --- End diff --
    
    Since moving so much to foreign keys, there are much fewer raw columns to test now.


> Integrate new models into parser
> --------------------------------
>
>                 Key: ARIA-105
>                 URL: https://issues.apache.org/jira/browse/ARIA-105
>             Project: AriaTosca
>          Issue Type: Task
>            Reporter: Ran Ziv
>            Assignee: Tal Liron
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message