diff options
author | Jhon Honce <jhonce@redhat.com> | 2018-08-29 09:44:01 -0700 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-31 16:52:52 +0000 |
commit | 6d067fcba2bf84fb5e7c7691b796d42d67028176 (patch) | |
tree | ff34ff2da6709301737cc78c2d6fb1e72e766513 /contrib/python/podman/test/test_tunnel.py | |
parent | 8245f0942811c2954d257ad8fac6cca8d36e896c (diff) | |
download | podman-6d067fcba2bf84fb5e7c7691b796d42d67028176.tar.gz podman-6d067fcba2bf84fb5e7c7691b796d42d67028176.tar.bz2 podman-6d067fcba2bf84fb5e7c7691b796d42d67028176.zip |
Turn on test debugging
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Closes: #1369
Approved by: rhatdan
Diffstat (limited to 'contrib/python/podman/test/test_tunnel.py')
-rw-r--r-- | contrib/python/podman/test/test_tunnel.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/python/podman/test/test_tunnel.py b/contrib/python/podman/test/test_tunnel.py index 8ee4b1052..9a33e76cd 100644 --- a/contrib/python/podman/test/test_tunnel.py +++ b/contrib/python/podman/test/test_tunnel.py @@ -1,5 +1,6 @@ from __future__ import absolute_import +import logging import time import unittest from unittest.mock import MagicMock, patch @@ -66,16 +67,19 @@ class TestTunnel(unittest.TestCase): ) tunnel = Tunnel(context).bore() - cmd = [ - 'ssh', - '-fNT', - '-q', + cmd = ['ssh', '-fNT'] + if logging.getLogger().getEffectiveLevel() == logging.DEBUG: + cmd.append('-v') + else: + cmd.append('-q') + + cmd.extend(( '-L', '{}:{}'.format(context.local_socket, context.remote_socket), '-i', context.identity_file, '{}@{}'.format(context.username, context.hostname), - ] + )) mock_finalize.assert_called_once_with(tunnel, tunnel.close) mock_exists.assert_called_once_with(context.local_socket) |