Fix path saving in backup repo

Change-Id: I3989af2eedb37f0bf95afe79bd017444c5bcde71
(cherry picked from commit 828cfc828f)
This commit is contained in:
Sergey Abramov 2016-02-24 14:05:50 +03:00
parent 10f0a2bef5
commit 2851f92913
2 changed files with 5 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class NaigunWWWBackup(base.PathArchivator):
continue
already_backuped.add(dir_name)
path = os.path.join(self.path, dir_name)
self.archive.add(path, self.name)
self.archive.add(path, os.path.join(self.name, dir_name))
class MirrorsBackup(NaigunWWWBackup):

View File

@ -243,6 +243,9 @@ def test_repos_backup(
stdout=subprocess.PIPE
)
test_archive.add.assert_has_calls(
[mock.call(os.path.join(path, i), name) for i in archive_add_list],
[
mock.call(os.path.join(path, i), os.path.join(name, i))
for i in archive_add_list
],
any_order=True)
assert test_archive.add.call_count == len(archive_add_list)