mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Backups: functional tests update; restoring backup bugfix
- updated functional tests to work with changed UI - fixed bug when restoring an uploaded file Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
3724dac9e6
commit
067fea7d17
5 files changed
+23
-15
No files matched your search
@@ -96,7 +96,7 @@ def get_exported_archive_apps(path):
|
||||
return output.splitlines()
|
||||
|
||||
|
||||
def _restore_exported_archive_handler(packet):
|
||||
def _restore_exported_archive_handler(packet, encryption_passphrase=None):
|
||||
"""Perform restore operation on packet."""
|
||||
locations = {'directories': packet.directories, 'files': packet.files}
|
||||
locations_data = json.dumps(locations)
|
||||
|
||||
@@ -96,7 +96,9 @@ class BorgRepository(object):
|
||||
|
||||
def list_archives(self):
|
||||
output = self.run(['list-repo', '--path', self.repo_path])
|
||||
return json.loads(output)['archives']
|
||||
archives = json.loads(output)['archives']
|
||||
return sorted(archives, key=lambda archive: archive['start'],
|
||||
reverse=True)
|
||||
|
||||
def get_view_content(self):
|
||||
"""Get archives with additional information as needed by the view"""
|
||||
|
||||
Reference in new issue
Block a user