mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-23 08:16:54 +00:00
Add testsuite shortcut to make remote repository testing more robust.
This commit is contained in:
parent
8bdda86ab4
commit
f3295cf3e8
2 changed files with 5 additions and 2 deletions
|
@ -80,7 +80,10 @@ def __init__(self, location, create=False):
|
||||||
self.unpacker = msgpack.Unpacker(use_list=False)
|
self.unpacker = msgpack.Unpacker(use_list=False)
|
||||||
self.msgid = 0
|
self.msgid = 0
|
||||||
self.received_msgid = 0
|
self.received_msgid = 0
|
||||||
args = ['ssh', '-p', str(location.port), '%s@%s' % (location.user or getpass.getuser(), location.host), 'darc', 'serve']
|
if location.host == '__testsuite__':
|
||||||
|
args = [sys.executable, '-m', 'darc.archiver', 'serve']
|
||||||
|
else:
|
||||||
|
args = ['ssh', '-p', str(location.port), '%s@%s' % (location.user or getpass.getuser(), location.host), 'darc', 'serve']
|
||||||
self.p = Popen(args, bufsize=0, stdin=PIPE, stdout=PIPE)
|
self.p = Popen(args, bufsize=0, stdin=PIPE, stdout=PIPE)
|
||||||
self.stdin_fd = self.p.stdin.fileno()
|
self.stdin_fd = self.p.stdin.fileno()
|
||||||
self.stdout_fd = self.p.stdout.fileno()
|
self.stdout_fd = self.p.stdout.fileno()
|
||||||
|
|
|
@ -219,4 +219,4 @@ def test_usage(self):
|
||||||
|
|
||||||
|
|
||||||
class RemoteArchiverTestCase(ArchiverTestCase):
|
class RemoteArchiverTestCase(ArchiverTestCase):
|
||||||
prefix = 'localhost:'
|
prefix = '__testsuite__:'
|
||||||
|
|
Loading…
Reference in a new issue