Commit 5dff2218 authored by David Wilson's avatar David Wilson

fakessh: cleanup master test.

parent 76d1e667
...@@ -3,7 +3,6 @@ import os ...@@ -3,7 +3,6 @@ import os
import shutil import shutil
import unittest import unittest
import mitogen.utils
import mitogen.fakessh import mitogen.fakessh
import testlib import testlib
...@@ -12,11 +11,16 @@ import testlib ...@@ -12,11 +11,16 @@ import testlib
class RsyncTest(testlib.DockerMixin, unittest.TestCase): class RsyncTest(testlib.DockerMixin, unittest.TestCase):
def test_rsync_from_master(self): def test_rsync_from_master(self):
context = self.docker_ssh_any() context = self.docker_ssh_any()
context.call(shutil.rmtree, '/tmp/data', ignore_errors=True)
mitogen.fakessh.run(context, self.router, [ if context.call(os.path.exists, '/tmp/data'):
context.call(shutil.rmtree, '/tmp/data')
return_code = mitogen.fakessh.run(context, self.router, [
'rsync', '--progress', '-vvva', 'rsync', '--progress', '-vvva',
testlib.data_path('.'), 'target:/tmp/data' testlib.data_path('.'), 'target:/tmp/data'
]) ])
assert return_code == 0
assert context.call(os.path.exists, '/tmp/data') assert context.call(os.path.exists, '/tmp/data')
assert context.call(os.path.exists, '/tmp/data/simple_pkg/a.py') assert context.call(os.path.exists, '/tmp/data/simple_pkg/a.py')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment