You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by em...@apache.org on 2017/02/07 15:48:51 UTC
incubator-ariatosca git commit: Rename dir
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-99-e2e-tests e3af53b6f -> a0115d6e6
Rename dir
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/a0115d6e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/a0115d6e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/a0115d6e
Branch: refs/heads/ARIA-99-e2e-tests
Commit: a0115d6e6767d7745dc1848d17161de19b470dfb
Parents: e3af53b
Author: Tal Liron <ta...@gmail.com>
Authored: Tue Feb 7 09:48:40 2017 -0600
Committer: Tal Liron <ta...@gmail.com>
Committed: Tue Feb 7 09:48:40 2017 -0600
----------------------------------------------------------------------
tests/complete/test_orchestrator.py | 60 --------------------------------
tests/complete/test_parser.py | 40 ---------------------
tests/end2end/test_orchestrator.py | 60 ++++++++++++++++++++++++++++++++
tests/end2end/test_parser.py | 40 +++++++++++++++++++++
4 files changed, 100 insertions(+), 100 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a0115d6e/tests/complete/test_orchestrator.py
----------------------------------------------------------------------
diff --git a/tests/complete/test_orchestrator.py b/tests/complete/test_orchestrator.py
deleted file mode 100644
index f930577..0000000
--- a/tests/complete/test_orchestrator.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# 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 tests.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()
-
- # TODO: this logic will eventually stabilize and be part of the ARIA API,
- # likely somewhere in aria.orchestrator.workflows
- if workflow_name in BUILTIN_WORKFLOWS:
- workflow_fn = import_fullname('aria.orchestrator.workflows.builtin.' + workflow_name)
- inputs = {}
- else:
- policy = context.modeling.instance.policies[workflow_name]
- sys.path.append(policy.properties['implementation'].value)
-
- workflow_fn = import_fullname(policy.properties['function'].value)
- inputs = OrderedDict([
- (k, v.value) for k, v in policy.properties.iteritems()
- if k not in WORKFLOW_POLICY_INTERNAL_PROPERTIES
- ])
-
- def _initialize_storage(model_storage):
- initialize_storage(context, model_storage, 1)
-
- runner = Runner(workflow_name, workflow_fn, inputs, _initialize_storage, 1)
- runner.run()
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a0115d6e/tests/complete/test_parser.py
----------------------------------------------------------------------
diff --git a/tests/complete/test_parser.py b/tests/complete/test_parser.py
deleted file mode 100644
index 7c243ab..0000000
--- a/tests/complete/test_parser.py
+++ /dev/null
@@ -1,40 +0,0 @@
-# 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 tests.parser.service_templates import consume_node_cellar
-
-
-def test_validation():
- consume_node_cellar('validate')
-
-
-def test_validation_no_cache():
- consume_node_cellar('validate', False)
-
-
-def test_presentation():
- consume_node_cellar('presentation')
-
-
-def test_model():
- consume_node_cellar('model')
-
-
-def test_types():
- consume_node_cellar('types')
-
-
-def test_instance():
- consume_node_cellar('instance')
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a0115d6e/tests/end2end/test_orchestrator.py
----------------------------------------------------------------------
diff --git a/tests/end2end/test_orchestrator.py b/tests/end2end/test_orchestrator.py
new file mode 100644
index 0000000..f930577
--- /dev/null
+++ b/tests/end2end/test_orchestrator.py
@@ -0,0 +1,60 @@
+# 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 tests.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()
+
+ # TODO: this logic will eventually stabilize and be part of the ARIA API,
+ # likely somewhere in aria.orchestrator.workflows
+ if workflow_name in BUILTIN_WORKFLOWS:
+ workflow_fn = import_fullname('aria.orchestrator.workflows.builtin.' + workflow_name)
+ inputs = {}
+ else:
+ policy = context.modeling.instance.policies[workflow_name]
+ sys.path.append(policy.properties['implementation'].value)
+
+ workflow_fn = import_fullname(policy.properties['function'].value)
+ inputs = OrderedDict([
+ (k, v.value) for k, v in policy.properties.iteritems()
+ if k not in WORKFLOW_POLICY_INTERNAL_PROPERTIES
+ ])
+
+ def _initialize_storage(model_storage):
+ initialize_storage(context, model_storage, 1)
+
+ runner = Runner(workflow_name, workflow_fn, inputs, _initialize_storage, 1)
+ runner.run()
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a0115d6e/tests/end2end/test_parser.py
----------------------------------------------------------------------
diff --git a/tests/end2end/test_parser.py b/tests/end2end/test_parser.py
new file mode 100644
index 0000000..7c243ab
--- /dev/null
+++ b/tests/end2end/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.
+# 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 tests.parser.service_templates import consume_node_cellar
+
+
+def test_validation():
+ consume_node_cellar('validate')
+
+
+def test_validation_no_cache():
+ consume_node_cellar('validate', False)
+
+
+def test_presentation():
+ consume_node_cellar('presentation')
+
+
+def test_model():
+ consume_node_cellar('model')
+
+
+def test_types():
+ consume_node_cellar('types')
+
+
+def test_instance():
+ consume_node_cellar('instance')