|
695 | 695 | }, |
696 | 696 | 'test-net': { |
697 | 697 | 'klass': 'AppVM', |
698 | | - 'label': 'red', |
| 698 | + 'label': 'scarlet', |
699 | 699 | 'properties': { |
700 | 700 | 'maxmem': '300', |
701 | 701 | 'memory': '300', |
@@ -1357,7 +1357,31 @@ def setup_expected_calls(self, parsed_qubes_xml, templates_map=None): |
1357 | 1357 | if name == 'dom0': |
1358 | 1358 | continue |
1359 | 1359 |
|
1360 | | - if self.storage_pool: |
| 1360 | + if self.storage_pool and vm['label'] == 'scarlet': |
| 1361 | + self.app.expected_calls[ |
| 1362 | + ('dom0', 'admin.vm.CreateInPool.' + vm['klass'], |
| 1363 | + templates_map.get(vm['template'], vm['template']), |
| 1364 | + 'name={} label={} pool={}'.format( |
| 1365 | + name, 'scarlet', self.storage_pool).encode())] = \ |
| 1366 | + b'2\0QubesLabelNotFoundError\0\0No such label\0' |
| 1367 | + self.app.expected_calls[ |
| 1368 | + ('dom0', 'admin.vm.CreateInPool.' + vm['klass'], |
| 1369 | + templates_map.get(vm['template'], vm['template']), |
| 1370 | + 'name={} label={} pool={}'.format( |
| 1371 | + name, 'red', self.storage_pool).encode())] = \ |
| 1372 | + b'0\0' |
| 1373 | + elif vm['label'] == 'scarlet': |
| 1374 | + self.app.expected_calls[ |
| 1375 | + ('dom0', 'admin.vm.Create.' + vm['klass'], |
| 1376 | + templates_map.get(vm['template'], vm['template']), |
| 1377 | + 'name={} label={}'.format(name, 'scarlet').encode())] =\ |
| 1378 | + b'2\0QubesLabelNotFoundError\0\0No such label\0' |
| 1379 | + self.app.expected_calls[ |
| 1380 | + ('dom0', 'admin.vm.Create.' + vm['klass'], |
| 1381 | + templates_map.get(vm['template'], vm['template']), |
| 1382 | + 'name={} label={}'.format(name, 'red').encode())] =\ |
| 1383 | + b'0\0' |
| 1384 | + elif self.storage_pool: |
1361 | 1385 | self.app.expected_calls[ |
1362 | 1386 | ('dom0', 'admin.vm.CreateInPool.' + vm['klass'], |
1363 | 1387 | templates_map.get(vm['template'], vm['template']), |
|
0 commit comments