You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mx...@apache.org on 2017/02/07 15:18:44 UTC
incubator-ariatosca git commit: runner has moved to the new storage
creation api
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-42-Generic-ctx-serialization-mechanism aded1c938 -> 6da1ba132
runner has moved to the new storage creation api
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/6da1ba13
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/6da1ba13
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/6da1ba13
Branch: refs/heads/ARIA-42-Generic-ctx-serialization-mechanism
Commit: 6da1ba1326a7aec7da1c68a7753134c9e66e5cd4
Parents: aded1c9
Author: mxmrlv <mx...@gmail.com>
Authored: Tue Feb 7 17:18:36 2017 +0200
Committer: mxmrlv <mx...@gmail.com>
Committed: Tue Feb 7 17:18:36 2017 +0200
----------------------------------------------------------------------
aria/orchestrator/runner.py | 10 ++++++----
tests/orchestrator/test_runner.py | 3 +--
2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/6da1ba13/aria/orchestrator/runner.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/runner.py b/aria/orchestrator/runner.py
index 6e5c054..6f998be 100644
--- a/aria/orchestrator/runner.py
+++ b/aria/orchestrator/runner.py
@@ -59,6 +59,8 @@ class Runner(object):
os.close(the_file)
self._storage_path = storage_path
+ self._storage_dir = os.path.dirname(storage_path)
+ self._storage_name = os.path.basename(storage_path)
self._is_storage_temporary = is_storage_temporary
workflow_context = self.create_workflow_context(workflow_name, deployment_id,
@@ -82,7 +84,7 @@ class Runner(object):
model_storage = application_model_storage(
sql_mapi.SQLAlchemyModelAPI,
initiator=sql_mapi.init_storage,
- initiator_kwargs=dict(base_dir=self._storage_path))
+ initiator_kwargs=dict(base_dir=self._storage_dir, filename=self._storage_name))
initialize_model_storage_fn(model_storage)
resource_storage = application_resource_storage(
filesystem_rapi.FileSystemResourceAPI, initiator_kwargs=dict(directory='.'))
@@ -101,7 +103,7 @@ class Runner(object):
return
def cleanup(self):
- if self._is_storage_temporary \
- and (self._storage_path is not None) \
- and os.path.isfile(self._storage_path):
+ if (self._is_storage_temporary and
+ (self._storage_path is not None) and
+ os.path.isfile(self._storage_path)):
os.remove(self._storage_path)
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/6da1ba13/tests/orchestrator/test_runner.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/test_runner.py b/tests/orchestrator/test_runner.py
index 0a6fadf..1d46e91 100644
--- a/tests/orchestrator/test_runner.py
+++ b/tests/orchestrator/test_runner.py
@@ -36,7 +36,6 @@ def cleanup():
OPERATION_RESULTS.clear()
-@pytest.mark.skip()
def test_runner_no_tasks():
@workflow
def workflow_fn(ctx, graph): # pylint: disable=unused-argument
@@ -44,7 +43,7 @@ def test_runner_no_tasks():
_test_runner(workflow_fn)
-@pytest.mark.skip()
+
def test_runner_tasks():
@workflow
def workflow_fn(ctx, graph):