BackupTestsMixin.create_backup_vms uses volumes

Instead of using root_img to access the path it uses now the proper volumes
This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-04-05 18:58:21 +02:00
parent d7fd66070a
commit e3ae6cdc1b

View File

@ -820,7 +820,7 @@ class BackupTestsMixin(SystemTestsMixin):
name=vmname, template=template, provides_network=True, label='red') name=vmname, template=template, provides_network=True, label='red')
testnet.create_on_disk() testnet.create_on_disk()
vms.append(testnet) vms.append(testnet)
self.fill_image(testnet.private_img, 20*1024*1024) self.fill_image(testnet.volumes['private'].vid, 20*1024*1024)
vmname = self.make_vm_name('test1') vmname = self.make_vm_name('test1')
if self.verbose: if self.verbose:
@ -831,16 +831,17 @@ class BackupTestsMixin(SystemTestsMixin):
testvm1.netvm = testnet testvm1.netvm = testnet
testvm1.create_on_disk() testvm1.create_on_disk()
vms.append(testvm1) vms.append(testvm1)
self.fill_image(testvm1.private_img, 100*1024*1024) self.fill_image(testvm1.volumes['private'].vid, 100*1024*1024)
vmname = self.make_vm_name('testhvm1') vmname = self.make_vm_name('testhvm1')
if self.verbose: if self.verbose:
print >>sys.stderr, "-> Creating %s" % vmname print >>sys.stderr, "-> Creating %s" % vmname
testvm2 = self.app.add_new_vm(qubes.vm.standalonevm.StandaloneVM, testvm2 = self.app.add_new_vm(qubes.vm.standalonevm.StandaloneVM,
name=vmname, name=vmname,
hvm=True, label='red') hvm=True,
testvm2.create_on_disk() label='red')
self.fill_image(testvm2.root_img, 1024*1024*1024, True) testvm2.create_on_disk(verbose=self.verbose)
self.fill_image(testvm2.volumes['root'].vid, 1024 * 1024 * 1024, True)
vms.append(testvm2) vms.append(testvm2)
vmname = self.make_vm_name('template') vmname = self.make_vm_name('template')