tests: fix after Marek's review
This commit is contained in:
parent
7f75ed4d73
commit
b6530200c9
@ -147,8 +147,8 @@ class SystemTestsMixin(object):
|
|||||||
try: vm.remove_from_disk()
|
try: vm.remove_from_disk()
|
||||||
except: pass
|
except: pass
|
||||||
|
|
||||||
try: vm.libvirtDomain.undefine()
|
try: vm.libvirt_domain.undefine()
|
||||||
except (AttributeError, libvirt.libvirtError): pass
|
except libvirt.libvirtError: pass
|
||||||
|
|
||||||
self.qc.pop(vm.qid)
|
self.qc.pop(vm.qid)
|
||||||
self.qc.save()
|
self.qc.save()
|
||||||
@ -337,7 +337,7 @@ class BackupTestsMixin(SystemTestsMixin):
|
|||||||
self.qc.load()
|
self.qc.load()
|
||||||
|
|
||||||
|
|
||||||
def restore_backup(self, source=None, appvm=None):
|
def restore_backup(self, source=None, appvm=None, options=None):
|
||||||
if source is None:
|
if source is None:
|
||||||
backupfile = os.path.join(self.backupdir,
|
backupfile = os.path.join(self.backupdir,
|
||||||
sorted(os.listdir(self.backupdir))[-1])
|
sorted(os.listdir(self.backupdir))[-1])
|
||||||
@ -349,7 +349,8 @@ class BackupTestsMixin(SystemTestsMixin):
|
|||||||
backupfile, "qubes",
|
backupfile, "qubes",
|
||||||
host_collection=self.qc,
|
host_collection=self.qc,
|
||||||
print_callback=self.print_callback,
|
print_callback=self.print_callback,
|
||||||
appvm=appvm)
|
appvm=appvm,
|
||||||
|
options=options or {})
|
||||||
|
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
qubes.backup.backup_restore_print_summary(backup_info)
|
qubes.backup.backup_restore_print_summary(backup_info)
|
||||||
@ -361,6 +362,9 @@ class BackupTestsMixin(SystemTestsMixin):
|
|||||||
print_callback=self.print_callback if self.verbose else None,
|
print_callback=self.print_callback if self.verbose else None,
|
||||||
error_callback=self.error_callback)
|
error_callback=self.error_callback)
|
||||||
|
|
||||||
|
# maybe someone forgot to call .save()
|
||||||
|
self.qc.load()
|
||||||
|
|
||||||
errors = []
|
errors = []
|
||||||
while not self.error_detected.empty():
|
while not self.error_detected.empty():
|
||||||
errors.append(self.error_detected.get())
|
errors.append(self.error_detected.get())
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user