You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by tliron <gi...@git.apache.org> on 2017/02/03 19:34:19 UTC

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

GitHub user tliron opened a pull request:

    https://github.com/apache/incubator-ariatosca/pull/67

    ARIA-99 Straightforward end-to-end tests for parser and built-in workflow

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-ariatosca ARIA-99-e2e-tests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-ariatosca/pull/67.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #67
    
----
commit aa5df644cbc605bf9692fd45ad6b311c2f7e74fa
Author: Tal Liron <ta...@gmail.com>
Date:   2017-02-03T19:32:46Z

    ARIA-99 Straightforward end-to-end tests for parser and built-in workflow

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
GitHub user tliron reopened a pull request:

    https://github.com/apache/incubator-ariatosca/pull/67

    ARIA-99 Straightforward end-to-end tests for parser and built-in workflow

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/incubator-ariatosca ARIA-99-e2e-tests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-ariatosca/pull/67.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #67
    
----
commit f94bff04750dfd566115a79b80f34adeae4732e7
Author: Tal Liron <ta...@gmail.com>
Date:   2017-02-03T19:32:46Z

    ARIA-99 Straightforward end-to-end tests for parser and built-in workflow

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99840764
  
    --- Diff: tests/resources/service_templates/node-cellar/types/aria.yaml ---
    @@ -0,0 +1,93 @@
    +
    +policy_types:
    --- End diff --
    
    lol I understand, but the problem is this yaml import should be part of the extension code and not part of the tests. I realize it's not there right now but I think you might as well have thrown it over there instead right now, no?
    Unless I'm missing something, and you think this duplication will remain even once we do have it as part of the extension..?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99841137
  
    --- Diff: tests/resources/service_templates/node-cellar/types/openstack.yaml ---
    @@ -0,0 +1,201 @@
    +#
    +# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
    +# 
    +# Licensed under the Apache License, Version 2.0 (the "License"); you may
    +# not use this file except in compliance with the License. You may obtain
    +# a copy of the License at
    +# 
    +#      http://www.apache.org/licenses/LICENSE-2.0
    +# 
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +# License for the specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +imports:
    +  - os.yaml
    +
    +dsl_definitions:
    +
    +  openstack:
    +    uuid_constraints: &OPENSTACK_UUID_CONSTRAINTS
    +      - pattern: '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$'
    +
    +node_types:
    +
    +  openstack.Instance:
    --- End diff --
    
    right, if these only test the parser then it makes sense,
    what I had in mind was that if we're talking true "complete" tests then in the future we'll want to run tests which use the actual plugin as well etc.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99804653
  
    --- Diff: tests/parser/service_templates.py ---
    @@ -0,0 +1,30 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#     http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +
    +from aria.utils.caching import cachedmethod
    +
    +from .utils import (get_uri, create_context, create_consumer)
    +
    +
    +def consume_node_cellar(consumer_class_name='instance', cache=True):
    --- End diff --
    
    sorry for nitpicking but if this module is designated to be a place for several templates to be used by various tests, I think simply "node_cellar" is a better name in this case :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99787382
  
    --- Diff: tests/resources/service_templates/node-cellar/types/aria.yaml ---
    @@ -0,0 +1,93 @@
    +
    +policy_types:
    --- End diff --
    
    Why is this here? This should not be a part of the tests


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99787572
  
    --- Diff: tests/resources/service_templates/node-cellar/node-cellar.yaml ---
    @@ -0,0 +1,299 @@
    +#
    +# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
    +# 
    +# Licensed under the Apache License, Version 2.0 (the "License"); you may
    +# not use this file except in compliance with the License. You may obtain
    +# a copy of the License at
    +# 
    +#      http://www.apache.org/licenses/LICENSE-2.0
    +# 
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +# License for the specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +# NFV is not used here, but we are using it just to validate the imports
    +tosca_definitions_version: tosca_simple_profile_for_nfv_1_0
    +#tosca_definitions_version: tosca_simple_yaml_1_0
    +
    +description: >-
    +  Node Cellar TOSCA blueprint.
    +  Here is some Unicode: \u4e2d\u570b.
    +
    +metadata:
    +  template_name: node-cellar
    +  template_author: ARIA
    +  template_version: '1.0.0'
    +  aria_version: '1.0'
    +
    +imports:
    +  - types/openstack.yaml
    +  - types/nodejs.yaml
    +  - types/mongodb.yaml
    +  - types/nginx.yaml
    +  - types/aria.yaml
    +
    +dsl_definitions:
    +
    +  default_openstack_credential: &DEFAULT_OPENSTACK_CREDENTIAL
    +    user: openstackadmin
    +    token: { concat: [ openstack, 123 ] }
    +
    +repositories:
    +
    +  node_cellar:
    +    description: >-
    +      The repository for the Node Cellar application and its dependencies.
    +    url: https://github.com/cloudify-cosmo/nodecellar/archive
    --- End diff --
    
    is it a good idea to have a direct reference to Cloudify here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99803951
  
    --- Diff: tests/orchestrator/test_complete.py ---
    @@ -0,0 +1,58 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#     http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +
    +import sys
    +
    +from aria.orchestrator.runner import Runner
    +from aria.orchestrator.workflows.builtin import BUILTIN_WORKFLOWS
    +from aria.parser.modeling.storage import initialize_storage
    +from aria.utils.imports import import_fullname
    +from aria.utils.collections import OrderedDict
    +
    +from ..parser.service_templates import consume_node_cellar
    +
    +
    +WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('function', 'implementation', 'dependencies')
    +
    +
    +def test_install():
    +    _workflow('install')
    +
    +
    +def test_custom():
    +    _workflow('maintenance_on')
    +
    +
    +def _workflow(workflow_name):
    +    context, _ = consume_node_cellar()
    +
    +    if workflow_name in BUILTIN_WORKFLOWS:
    --- End diff --
    
    this section shouldn't be part of the test
    the logic needs to sit elsewhere but the CLI in which case the test can test it as well


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99832398
  
    --- Diff: tests/orchestrator/test_complete.py ---
    @@ -0,0 +1,58 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    --- End diff --
    
    I disagree, but it's not too important. Do you want me to move them? I'd rather not use "e2e" because most people will not know what that means. How about "complete"?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99833846
  
    --- Diff: tests/parser/service_templates.py ---
    @@ -0,0 +1,30 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#     http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +
    +from aria.utils.caching import cachedmethod
    +
    +from .utils import (get_uri, create_context, create_consumer)
    +
    +
    +def consume_node_cellar(consumer_class_name='instance', cache=True):
    --- End diff --
    
    I like function names to have verbs in them, because it makes reading code that calls them easier.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99834067
  
    --- Diff: tests/orchestrator/test_complete.py ---
    @@ -0,0 +1,58 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#     http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +
    +import sys
    +
    +from aria.orchestrator.runner import Runner
    +from aria.orchestrator.workflows.builtin import BUILTIN_WORKFLOWS
    +from aria.parser.modeling.storage import initialize_storage
    +from aria.utils.imports import import_fullname
    +from aria.utils.collections import OrderedDict
    +
    +from ..parser.service_templates import consume_node_cellar
    +
    +
    +WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('function', 'implementation', 'dependencies')
    +
    +
    +def test_install():
    +    _workflow('install')
    +
    +
    +def test_custom():
    +    _workflow('maintenance_on')
    --- End diff --
    
    Since we insist that all our code have tests, I added this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99787215
  
    --- Diff: tests/resources/service_templates/node-cellar/types/openstack.yaml ---
    @@ -0,0 +1,201 @@
    +#
    +# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
    +# 
    +# Licensed under the Apache License, Version 2.0 (the "License"); you may
    +# not use this file except in compliance with the License. You may obtain
    +# a copy of the License at
    +# 
    +#      http://www.apache.org/licenses/LICENSE-2.0
    +# 
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +# License for the specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +imports:
    +  - os.yaml
    +
    +dsl_definitions:
    +
    +  openstack:
    +    uuid_constraints: &OPENSTACK_UUID_CONSTRAINTS
    +      - pattern: '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$'
    +
    +node_types:
    +
    +  openstack.Instance:
    --- End diff --
    
    This is a duplication of what we (will need to) have for the Openstack plugin (have yet to translate its plugin.yaml)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-ariatosca/pull/67


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99832085
  
    --- Diff: tests/resources/service_templates/node-cellar/node-cellar.yaml ---
    @@ -0,0 +1,299 @@
    +#
    +# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
    +# 
    +# Licensed under the Apache License, Version 2.0 (the "License"); you may
    +# not use this file except in compliance with the License. You may obtain
    +# a copy of the License at
    +# 
    +#      http://www.apache.org/licenses/LICENSE-2.0
    +# 
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +# License for the specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +# NFV is not used here, but we are using it just to validate the imports
    +tosca_definitions_version: tosca_simple_profile_for_nfv_1_0
    +#tosca_definitions_version: tosca_simple_yaml_1_0
    +
    +description: >-
    +  Node Cellar TOSCA blueprint.
    +  Here is some Unicode: \u4e2d\u570b.
    +
    +metadata:
    +  template_name: node-cellar
    +  template_author: ARIA
    +  template_version: '1.0.0'
    +  aria_version: '1.0'
    --- End diff --
    
    Again, this utterly does not matter. It's here to test metadat parsing, to show that we can parse built in fields as well as custom fields.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99837888
  
    --- Diff: tests/orchestrator/test_complete.py ---
    @@ -0,0 +1,58 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    --- End diff --
    
    I don't mind the name much, didn't really mean for it to be "e2e". I think "system_tests" is a better name than "complete", but i'll leave it up to you - I mostly want them separated from the rest - that, I do think is important.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99834002
  
    --- Diff: tests/orchestrator/test_complete.py ---
    @@ -0,0 +1,58 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#     http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +
    +import sys
    +
    +from aria.orchestrator.runner import Runner
    +from aria.orchestrator.workflows.builtin import BUILTIN_WORKFLOWS
    +from aria.parser.modeling.storage import initialize_storage
    +from aria.utils.imports import import_fullname
    +from aria.utils.collections import OrderedDict
    +
    +from ..parser.service_templates import consume_node_cellar
    +
    +
    +WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('function', 'implementation', 'dependencies')
    +
    +
    +def test_install():
    +    _workflow('install')
    +
    +
    +def test_custom():
    +    _workflow('maintenance_on')
    +
    +
    +def _workflow(workflow_name):
    +    context, _ = consume_node_cellar()
    +
    +    if workflow_name in BUILTIN_WORKFLOWS:
    --- End diff --
    
    Since we're rehauling the CLI I am worried about code disappearing. For now I say let's keep this in the test. When we have the new CLI this particular section of code can be redone. I will add a TODO comment here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99839449
  
    --- Diff: tests/orchestrator/test_complete.py ---
    @@ -0,0 +1,58 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#     http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +
    +import sys
    +
    +from aria.orchestrator.runner import Runner
    +from aria.orchestrator.workflows.builtin import BUILTIN_WORKFLOWS
    +from aria.parser.modeling.storage import initialize_storage
    +from aria.utils.imports import import_fullname
    +from aria.utils.collections import OrderedDict
    +
    +from ..parser.service_templates import consume_node_cellar
    +
    +
    +WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('function', 'implementation', 'dependencies')
    +
    +
    +def test_install():
    +    _workflow('install')
    +
    +
    +def test_custom():
    +    _workflow('maintenance_on')
    +
    +
    +def _workflow(workflow_name):
    +    context, _ = consume_node_cellar()
    +
    +    if workflow_name in BUILTIN_WORKFLOWS:
    --- End diff --
    
    :+1: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99804887
  
    --- Diff: tests/parser/test_complete.py ---
    @@ -0,0 +1,40 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    --- End diff --
    
    I think the module name should be changed, possibly to "test_consumers" or so?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99832161
  
    --- Diff: tests/resources/service_templates/node-cellar/node-cellar.yaml ---
    @@ -0,0 +1,299 @@
    +#
    +# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
    +# 
    +# Licensed under the Apache License, Version 2.0 (the "License"); you may
    +# not use this file except in compliance with the License. You may obtain
    +# a copy of the License at
    +# 
    +#      http://www.apache.org/licenses/LICENSE-2.0
    +# 
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +# License for the specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +# NFV is not used here, but we are using it just to validate the imports
    +tosca_definitions_version: tosca_simple_profile_for_nfv_1_0
    +#tosca_definitions_version: tosca_simple_yaml_1_0
    +
    +description: >-
    +  Node Cellar TOSCA blueprint.
    +  Here is some Unicode: \u4e2d\u570b.
    +
    +metadata:
    +  template_name: node-cellar
    +  template_author: ARIA
    +  template_version: '1.0.0'
    +  aria_version: '1.0'
    +
    +imports:
    +  - types/openstack.yaml
    +  - types/nodejs.yaml
    +  - types/mongodb.yaml
    +  - types/nginx.yaml
    +  - types/aria.yaml
    +
    +dsl_definitions:
    +
    +  default_openstack_credential: &DEFAULT_OPENSTACK_CREDENTIAL
    +    user: openstackadmin
    +    token: { concat: [ openstack, 123 ] }
    +
    +repositories:
    +
    +  node_cellar:
    +    description: >-
    +      The repository for the Node Cellar application and its dependencies.
    +    url: https://github.com/cloudify-cosmo/nodecellar/archive
    --- End diff --
    
    It could just be a dummy URL.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99831973
  
    --- Diff: tests/resources/service_templates/node-cellar/types/aria.yaml ---
    @@ -0,0 +1,93 @@
    +
    +policy_types:
    --- End diff --
    
    To test policy type parsing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99831931
  
    --- Diff: tests/resources/service_templates/node-cellar/types/openstack.yaml ---
    @@ -0,0 +1,201 @@
    +#
    +# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
    +# 
    +# Licensed under the Apache License, Version 2.0 (the "License"); you may
    +# not use this file except in compliance with the License. You may obtain
    +# a copy of the License at
    +# 
    +#      http://www.apache.org/licenses/LICENSE-2.0
    +# 
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +# License for the specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +imports:
    +  - os.yaml
    +
    +dsl_definitions:
    +
    +  openstack:
    +    uuid_constraints: &OPENSTACK_UUID_CONSTRAINTS
    +      - pattern: '^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$'
    +
    +node_types:
    +
    +  openstack.Instance:
    --- End diff --
    
    All these files are just for testing the TOSCA grammar. That's why they are in /tests/. There is no intention for them to be anything other than that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by tliron <gi...@git.apache.org>.
Github user tliron closed the pull request at:

    https://github.com/apache/incubator-ariatosca/pull/67


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99787733
  
    --- Diff: tests/resources/service_templates/node-cellar/node-cellar.yaml ---
    @@ -0,0 +1,299 @@
    +#
    +# Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved.
    +# 
    +# Licensed under the Apache License, Version 2.0 (the "License"); you may
    +# not use this file except in compliance with the License. You may obtain
    +# a copy of the License at
    +# 
    +#      http://www.apache.org/licenses/LICENSE-2.0
    +# 
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    +# License for the specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +# NFV is not used here, but we are using it just to validate the imports
    +tosca_definitions_version: tosca_simple_profile_for_nfv_1_0
    +#tosca_definitions_version: tosca_simple_yaml_1_0
    +
    +description: >-
    +  Node Cellar TOSCA blueprint.
    +  Here is some Unicode: \u4e2d\u570b.
    +
    +metadata:
    +  template_name: node-cellar
    +  template_author: ARIA
    +  template_version: '1.0.0'
    +  aria_version: '1.0'
    --- End diff --
    
    we technically never actually called ARIA's first version to be "1.0". actually, on JIRA the version we're supposedly working towards is "0.1.0". not that it really matters here, but thought I'd mention it


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99804091
  
    --- Diff: tests/orchestrator/test_complete.py ---
    @@ -0,0 +1,58 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    --- End diff --
    
    IMO e2e tests need to be separated from unit/functional tests, and sit under, say, "tests/e2e" or something similar.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99840345
  
    --- Diff: tests/complete/test_parser.py ---
    @@ -0,0 +1,40 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    --- End diff --
    
    Actually, I'm not sure these tests should have moved out from where they were at.
    "Complete" means end to end tests; While these are not unit tests per se, they are parser specific.
    We already have many tests which aren't standard unit tests yet are treated as such. See execution plugin tests for example - those actually run the workflow engine.
    On the other hand, the parser might indeed be used regardless of other components of ARIA by other projects, and so it might be ok to leave this here.
    Again, I'll leave it for your consideration.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-ariatosca pull request #67: ARIA-99 Straightforward end-to-end tes...

Posted by ran-z <gi...@git.apache.org>.
Github user ran-z commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/67#discussion_r99804425
  
    --- Diff: tests/orchestrator/test_complete.py ---
    @@ -0,0 +1,58 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#     http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +
    +import sys
    +
    +from aria.orchestrator.runner import Runner
    +from aria.orchestrator.workflows.builtin import BUILTIN_WORKFLOWS
    +from aria.parser.modeling.storage import initialize_storage
    +from aria.utils.imports import import_fullname
    +from aria.utils.collections import OrderedDict
    +
    +from ..parser.service_templates import consume_node_cellar
    +
    +
    +WORKFLOW_POLICY_INTERNAL_PROPERTIES = ('function', 'implementation', 'dependencies')
    +
    +
    +def test_install():
    +    _workflow('install')
    +
    +
    +def test_custom():
    +    _workflow('maintenance_on')
    --- End diff --
    
    I'm not sure we should be testing custom workflows at this time, simply because we haven't quite implemented this feature "for real" yet. It's fine to keep it, I just don't see much benefit for it at the moment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---