Revision 4c1a464b qa/ganeti-qa.py
b/qa/ganeti-qa.py | ||
---|---|---|
245 | 245 |
RunTestIf(["instance-console", "rapi"], |
246 | 246 |
qa_rapi.TestRapiInstanceConsole, instance) |
247 | 247 |
|
248 |
RunTestIf("instance-reinstall", qa_instance.TestInstanceShutdown, instance) |
|
248 |
DOWN_TESTS = ["instance-reinstall", "instance-rename"] |
|
249 |
# shutdown instance for any 'down' tests |
|
250 |
RunTestIf(DOWN_TESTS, qa_instance.TestInstanceShutdown, instance) |
|
251 |
|
|
252 |
# now run the 'down' state tests |
|
249 | 253 |
RunTestIf("instance-reinstall", qa_instance.TestInstanceReinstall, instance) |
250 | 254 |
RunTestIf(["instance-reinstall", "rapi"], |
251 | 255 |
qa_rapi.TestRapiInstanceReinstall, instance) |
252 |
RunTestIf("instance-reinstall", qa_instance.TestInstanceStartup, instance) |
|
253 |
|
|
254 |
RunTestIf("instance-reboot", qa_instance.TestInstanceReboot, instance) |
|
256 |
# RAPI reinstall will leave the instance up by default, so we have |
|
257 |
# to stop it again |
|
258 |
RunTestIf(["instance-reinstall", "rapi"], |
|
259 |
qa_rapi.TestRapiInstanceShutdown, instance) |
|
255 | 260 |
|
256 | 261 |
if qa_config.TestEnabled("instance-rename"): |
257 | 262 |
rename_source = instance["name"] |
258 | 263 |
rename_target = qa_config.get("rename", None) |
259 |
RunTest(qa_instance.TestInstanceShutdown, instance) |
|
260 | 264 |
# perform instance rename to the same name |
261 |
RunTest(qa_instance.TestInstanceRename, rename_source, rename_source) |
|
262 |
RunTestIf("rapi", qa_rapi.TestRapiInstanceRename, |
|
265 |
RunTest(qa_instance.TestInstanceRenameAndBack, |
|
266 |
rename_source, rename_source) |
|
267 |
RunTestIf("rapi", qa_rapi.TestRapiInstanceRenameAndBack, |
|
263 | 268 |
rename_source, rename_source) |
264 | 269 |
if rename_target is not None: |
265 | 270 |
# perform instance rename to a different name, if we have one configured |
266 |
RunTest(qa_instance.TestInstanceRename, rename_source, rename_target)
|
|
267 |
RunTest(qa_instance.TestInstanceRename, rename_target, rename_source)
|
|
268 |
RunTestIf("rapi", qa_rapi.TestRapiInstanceRename, |
|
271 |
RunTest(qa_instance.TestInstanceRenameAndBack,
|
|
272 |
rename_source, rename_target)
|
|
273 |
RunTestIf("rapi", qa_rapi.TestRapiInstanceRenameAndBack,
|
|
269 | 274 |
rename_source, rename_target) |
270 |
RunTestIf("rapi", qa_rapi.TestRapiInstanceRename, |
|
271 |
rename_target, rename_source) |
|
272 |
RunTest(qa_instance.TestInstanceStartup, instance) |
|
275 |
|
|
276 |
# and now start the instance again |
|
277 |
RunTestIf(DOWN_TESTS, qa_instance.TestInstanceStartup, instance) |
|
278 |
|
|
279 |
RunTestIf("instance-reboot", qa_instance.TestInstanceReboot, instance) |
|
273 | 280 |
|
274 | 281 |
RunTestIf("tags", qa_tags.TestInstanceTags, instance) |
275 | 282 |
|
Also available in: Unified diff