From 51658fdd66f55dd8bd7f00b798656e895b26c50f Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 31 Oct 2018 00:05:21 +0000 Subject: [PATCH] issue #409: name-prefix stubs so they can be added to PATH Allows us to reference them from playbooks easily. --- tests/data/stubs/{docker.py => stub-docker.py} | 0 tests/data/stubs/{lxc-attach.py => stub-lxc-attach.py} | 0 tests/data/stubs/{lxc.py => stub-lxc.py} | 0 tests/data/stubs/{ssh.py => stub-ssh.py} | 0 tests/docker_test.py | 2 +- tests/lxc_test.py | 2 +- tests/lxd_test.py | 2 +- tests/ssh_test.py | 4 ++-- 8 files changed, 5 insertions(+), 5 deletions(-) rename tests/data/stubs/{docker.py => stub-docker.py} (100%) rename tests/data/stubs/{lxc-attach.py => stub-lxc-attach.py} (100%) rename tests/data/stubs/{lxc.py => stub-lxc.py} (100%) rename tests/data/stubs/{ssh.py => stub-ssh.py} (100%) diff --git a/tests/data/stubs/docker.py b/tests/data/stubs/stub-docker.py similarity index 100% rename from tests/data/stubs/docker.py rename to tests/data/stubs/stub-docker.py diff --git a/tests/data/stubs/lxc-attach.py b/tests/data/stubs/stub-lxc-attach.py similarity index 100% rename from tests/data/stubs/lxc-attach.py rename to tests/data/stubs/stub-lxc-attach.py diff --git a/tests/data/stubs/lxc.py b/tests/data/stubs/stub-lxc.py similarity index 100% rename from tests/data/stubs/lxc.py rename to tests/data/stubs/stub-lxc.py diff --git a/tests/data/stubs/ssh.py b/tests/data/stubs/stub-ssh.py similarity index 100% rename from tests/data/stubs/ssh.py rename to tests/data/stubs/stub-ssh.py diff --git a/tests/docker_test.py b/tests/docker_test.py index 33ead10c..2d45609a 100644 --- a/tests/docker_test.py +++ b/tests/docker_test.py @@ -9,7 +9,7 @@ import testlib class ConstructorTest(testlib.RouterMixin, unittest2.TestCase): def test_okay(self): - docker_path = testlib.data_path('stubs/docker.py') + docker_path = testlib.data_path('stubs/stub-docker.py') context = self.router.docker( container='container_name', docker_path=docker_path, diff --git a/tests/lxc_test.py b/tests/lxc_test.py index 5d8e14d8..bcab8e68 100644 --- a/tests/lxc_test.py +++ b/tests/lxc_test.py @@ -13,7 +13,7 @@ def has_subseq(seq, subseq): class ConstructorTest(testlib.RouterMixin, testlib.TestCase): - lxc_attach_path = testlib.data_path('stubs/lxc-attach.py') + lxc_attach_path = testlib.data_path('stubs/stub-lxc-attach.py') def test_okay(self): context = self.router.lxc( diff --git a/tests/lxd_test.py b/tests/lxd_test.py index cae1172c..e59da43c 100644 --- a/tests/lxd_test.py +++ b/tests/lxd_test.py @@ -11,7 +11,7 @@ import testlib class ConstructorTest(testlib.RouterMixin, testlib.TestCase): def test_okay(self): - lxc_path = testlib.data_path('stubs/lxc.py') + lxc_path = testlib.data_path('stubs/stub-lxc.py') context = self.router.lxd( container='container_name', lxc_path=lxc_path, diff --git a/tests/ssh_test.py b/tests/ssh_test.py index bdee30dd..36359a66 100644 --- a/tests/ssh_test.py +++ b/tests/ssh_test.py @@ -22,7 +22,7 @@ class StubSshMixin(testlib.RouterMixin): return self.router.ssh( hostname='hostname', username='mitogen__has_sudo', - ssh_path=testlib.data_path('stubs/ssh.py'), + ssh_path=testlib.data_path('stubs/stub-ssh.py'), **kwargs ) finally: @@ -34,7 +34,7 @@ class ConstructorTest(testlib.RouterMixin, unittest2.TestCase): context = self.router.ssh( hostname='hostname', username='mitogen__has_sudo', - ssh_path=testlib.data_path('stubs/ssh.py'), + ssh_path=testlib.data_path('stubs/stub-ssh.py'), ) #context.call(mitogen.utils.log_to_file, '/tmp/log') #context.call(mitogen.utils.disable_site_packages)