Commit 1f497600 authored by Nicolas Wavrant's avatar Nicolas Wavrant

fixup

parent 134db22b
......@@ -154,20 +154,23 @@ def synchroniseRunnerConfigurationDirectory(config, backup_path):
def synchroniseRunnerWorkingDirectory(config, backup_path):
file_list = []
exclude_list = []
if os.path.isdir('instance'):
file_list.append('instance')
exclude_list = getExcludePathList('.')
rsync(
config.rsync_binary, 'instance', backup_path,
["--exclude={}".format(x) for x in exclude_list],
dry=config.dry,
)
file_list = []
for file in ('project', 'public', 'proxy.db'):
if os.path.exists(file):
file_list.append(file)
if file_list:
rsync(config.rsync_binary, file_list, backup_path, dry=config.dry)
rsync(
config.rsync_binary, file_list, backup_path,
["--exclude={}".format(x) for x in exclude_list],
dry=config.dry
)
def getSlappartSignatureMethodDict():
......
......@@ -153,12 +153,9 @@ class TestRunnerExporter(unittest.TestCase):
config, 'backup/runner/runner'
)
self.assertEqual(check_call_mock.call_count, 2)
check_call_mock.assert_any_call(
['rsync', '-rlptgov', '--stats', '--safe-links', '--ignore-missing-args', '--delete', '--delete-excluded', '--exclude=*.sock', '--exclude=*.socket', '--exclude=*.pid', '--exclude=.installed*.cfg', '--exclude=srv/backup/**', '--exclude=instance/slappart0/etc/nicolas.txt', '--exclude=instance/slappart0/etc/rafael.txt', '--exclude=srv/exporter.exclude', 'instance', 'backup/runner/runner']
)
self.assertEqual(check_call_mock.call_count, 1)
check_call_mock.assert_any_call(
['rsync', '-rlptgov', '--stats', '--safe-links', '--ignore-missing-args', '--delete', '--delete-excluded', 'project', 'public', 'proxy.db', 'backup/runner/runner']
['rsync', '-rlptgov', '--stats', '--safe-links', '--ignore-missing-args', '--delete', '--delete-excluded', '--exclude=*.sock', '--exclude=*.socket', '--exclude=*.pid', '--exclude=.installed*.cfg', '--exclude=srv/backup/**', '--exclude=instance/slappart0/etc/nicolas.txt', '--exclude=instance/slappart0/etc/rafael.txt', '--exclude=srv/exporter.exclude', 'instance', 'project', 'public', 'proxy.db', 'backup/runner/runner']
)
def test_getSlappartSignatureMethodDict(self):
......
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