tests: copy pool configuration into qubes-test.xml
If template choosen for the tests is installed in non-default storage pool, this pool also needs to be imported into qubes-test.xml.
This commit is contained in:
parent
0c43329188
commit
bd9300b38e
@ -507,10 +507,20 @@ class SystemTestsMixin(object):
|
||||
elif isinstance(template, str):
|
||||
template = self.host_app.domains[template]
|
||||
|
||||
used_pools = [vol.pool for vol in template.volumes.values()]
|
||||
|
||||
for pool in used_pools:
|
||||
if pool in self.app.pools:
|
||||
continue
|
||||
self.app.add_pool(**self.host_app.pools[pool].config)
|
||||
|
||||
template_vm = self.app.add_new_vm(qubes.vm.templatevm.TemplateVM,
|
||||
name=template.name,
|
||||
uuid=template.uuid,
|
||||
label='black')
|
||||
for name, volume in template_vm.volumes.items():
|
||||
if volume.pool != template.volumes[name].pool:
|
||||
template_vm.storage.init_volume(name, volume.config)
|
||||
self.app.default_template = template_vm
|
||||
|
||||
def init_networking(self):
|
||||
|
Loading…
Reference in New Issue
Block a user