Revision 638a7266 qa/ganeti-qa.py
b/qa/ganeti-qa.py | ||
---|---|---|
203 | 203 |
RunTest(qa_rapi.TestInstance, instance) |
204 | 204 |
|
205 | 205 |
|
206 |
def RunExportImportTests(instance, pnode): |
|
206 |
def RunExportImportTests(instance, pnode, snode):
|
|
207 | 207 |
"""Tries to export and import the instance. |
208 | 208 |
|
209 |
@param pnode: current primary node of the instance |
|
210 |
@param snode: current secondary node of the instance, if any, |
|
211 |
otherwise None |
|
212 |
|
|
209 | 213 |
""" |
210 | 214 |
if qa_config.TestEnabled('instance-export'): |
211 | 215 |
RunTest(qa_instance.TestInstanceExportNoTarget, instance) |
... | ... | |
231 | 235 |
qa_config.TestEnabled("inter-cluster-instance-move")): |
232 | 236 |
newinst = qa_config.AcquireInstance() |
233 | 237 |
try: |
234 |
pnode2 = qa_config.AcquireNode(exclude=pnode) |
|
238 |
if snode is None: |
|
239 |
excl = [pnode] |
|
240 |
else: |
|
241 |
excl = [pnode, snode] |
|
242 |
tnode = qa_config.AcquireNode(exclude=excl) |
|
235 | 243 |
try: |
236 | 244 |
RunTest(qa_rapi.TestInterClusterInstanceMove, instance, newinst, |
237 |
pnode, pnode2)
|
|
245 |
pnode, snode, tnode)
|
|
238 | 246 |
finally: |
239 |
qa_config.ReleaseNode(pnode2)
|
|
247 |
qa_config.ReleaseNode(tnode)
|
|
240 | 248 |
finally: |
241 | 249 |
qa_config.ReleaseInstance(newinst) |
242 | 250 |
|
... | ... | |
360 | 368 |
if qa_config.TestEnabled('instance-add-plain-disk'): |
361 | 369 |
instance = RunTest(qa_instance.TestInstanceAddWithPlainDisk, pnode) |
362 | 370 |
RunCommonInstanceTests(instance) |
363 |
RunExportImportTests(instance, pnode) |
|
371 |
RunExportImportTests(instance, pnode, None)
|
|
364 | 372 |
RunDaemonTests(instance, pnode) |
365 | 373 |
RunTest(qa_instance.TestInstanceRemove, instance) |
366 | 374 |
del instance |
... | ... | |
380 | 388 |
RunTest(qa_instance.TestInstanceShutdown, instance) |
381 | 389 |
RunTest(qa_instance.TestInstanceConvertDisk, instance, snode) |
382 | 390 |
RunTest(qa_instance.TestInstanceStartup, instance) |
383 |
RunExportImportTests(instance, pnode) |
|
391 |
RunExportImportTests(instance, pnode, snode)
|
|
384 | 392 |
RunHardwareFailureTests(instance, pnode, snode) |
385 | 393 |
RunTest(qa_instance.TestInstanceRemove, instance) |
386 | 394 |
del instance |
Also available in: Unified diff