Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-117-Log-model-should-have-an-Task-field c32d05194 -> d44933de7


a first try at ssh fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/d44933de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/d44933de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/d44933de

Branch: refs/heads/ARIA-117-Log-model-should-have-an-Task-field
Commit: d44933de755d1df076e8c1f280ca772dea6acd0b
Parents: c32d051
Author: max-orlov <[email protected]>
Authored: Sun Mar 12 19:14:08 2017 +0200
Committer: max-orlov <[email protected]>
Committed: Sun Mar 12 19:14:08 2017 +0200

----------------------------------------------------------------------
 .../orchestrator/execution_plugin/ssh/tunnel.py |  4 +++
 .../execution_plugin/test_ctx_proxy_server.py   |  5 ++-
 tox.ini                                         | 35 ++++++++++----------
 3 files changed, 26 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d44933de/aria/orchestrator/execution_plugin/ssh/tunnel.py
----------------------------------------------------------------------
diff --git a/aria/orchestrator/execution_plugin/ssh/tunnel.py 
b/aria/orchestrator/execution_plugin/ssh/tunnel.py
index 6fc8d54..2790665 100644
--- a/aria/orchestrator/execution_plugin/ssh/tunnel.py
+++ b/aria/orchestrator/execution_plugin/ssh/tunnel.py
@@ -12,6 +12,8 @@ import fabric.api
 import fabric.state
 import fabric.thread_handling
 
+from aria.orchestrator.execution_plugin import common
+
 
 @contextlib.contextmanager
 def remote(ctx, local_port, remote_port=0, local_host='localhost', 
remote_bind_address='127.0.0.1'):
@@ -42,6 +44,8 @@ def remote(ctx, local_port, remote_port=0, 
local_host='localhost', remote_bind_a
         sock = socket.socket()
         sockets.append(sock)
 
+        common.patch_ctx(ctx)
+
         try:
             sock.connect((local_host, local_port))
         except Exception as e:

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d44933de/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py
----------------------------------------------------------------------
diff --git a/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py 
b/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py
index 98ceff9..9b1abb0 100644
--- a/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py
+++ b/tests/orchestrator/execution_plugin/test_ctx_proxy_server.py
@@ -138,7 +138,10 @@ class TestCtxProxy(object):
     @pytest.fixture
     def ctx(self):
         class MockCtx(object):
-            pass
+            class MockTask(object):
+                abort = lambda *args, **kwargs: None
+                retry = lambda *args, **kwargs: None
+            task = MockTask()
         ctx = MockCtx()
         properties = {
             'prop1': 'value1',

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d44933de/tox.ini
----------------------------------------------------------------------
diff --git a/tox.ini b/tox.ini
index fa4bd5c..6f7bb46 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,7 +11,8 @@
 # limitations under the License.
 
 [tox]
-envlist=py27,py26,pywin,pylint_code,pylint_tests
+envlist=py27
+;,py26,pywin,pylint_code,pylint_tests
 
 [testenv]
 passenv =
@@ -25,23 +26,23 @@ deps =
     -rrequirements.txt
     -rtests/requirements.txt
 basepython =
-  py26: python2.6
+;  py26: python2.6
   py27: python2.7
-  pywin: {env:PYTHON:}\python.exe
-  pylint_code: python2.7
-  pylint_tests: python2.7
+;  pywin: {env:PYTHON:}\python.exe
+;  pylint_code: python2.7
+;  pylint_tests: python2.7
 
 [testenv:py27]
-commands=pytest tests --cov-report term-missing --cov aria
+commands=pytest tests/orchestrator/execution_plugin/test_ssh.py 
 
-[testenv:py26]
-commands=pytest tests --cov-report term-missing --cov aria
-
-[testenv:pywin]
-commands=pytest tests --cov-report term-missing --cov aria
-
-[testenv:pylint_code]
-commands=pylint --rcfile=aria/.pylintrc --disable=fixme,missing-docstring 
--ignore=commands.py aria
-
-[testenv:pylint_tests]
-commands=pylint --rcfile=tests/.pylintrc --disable=fixme,missing-docstring 
tests
+;[testenv:py26]
+;commands=pytest tests --cov-report term-missing --cov aria
+;
+;[testenv:pywin]
+;commands=pytest tests --cov-report term-missing --cov aria
+;
+;[testenv:pylint_code]
+;commands=pylint --rcfile=aria/.pylintrc --disable=fixme,missing-docstring 
--ignore=commands.py aria
+;
+;[testenv:pylint_tests]
+;commands=pylint --rcfile=tests/.pylintrc --disable=fixme,missing-docstring 
tests

Reply via email to