Revision 50ef6a41 qa/ganeti-qa.py

b/qa/ganeti-qa.py
1 1
#!/usr/bin/python -u
2 2
#
3 3

  
4
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Google Inc.
4
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
457 457
            pnode, snode)
458 458

  
459 459

  
460
def RunExclusiveStorageTests():
461
  """Test exclusive storage."""
462
  if not qa_config.TestEnabled("cluster-exclusive-storage"):
463
    return
464

  
465
  node = qa_config.AcquireNode()
466
  try:
467
    old_es = qa_cluster.TestSetExclStorCluster(True)
468
    if qa_config.TestEnabled("instance-add-plain-disk"):
469
      # Make sure that the cluster doesn't have any pre-existing problem
470
      qa_cluster.AssertClusterVerify()
471
      instance1 = qa_instance.TestInstanceAddWithPlainDisk(node)
472
      instance2 = qa_instance.TestInstanceAddWithPlainDisk(node)
473
      # cluster-verify checks that disks are allocated correctly
474
      qa_cluster.AssertClusterVerify()
475
      qa_instance.TestInstanceRemove(instance1)
476
      qa_instance.TestInstanceRemove(instance2)
477
    qa_cluster.TestSetExclStorCluster(old_es)
478
  finally:
479
    qa_config.ReleaseNode(node)
480

  
481

  
460 482
def RunQa():
461 483
  """Main QA body.
462 484

  
......
587 609
  finally:
588 610
    qa_config.ReleaseNode(pnode)
589 611

  
612
  RunExclusiveStorageTests()
613

  
590 614
  RunTestIf("create-cluster", qa_node.TestNodeRemoveAll)
591 615

  
592 616
  RunTestIf("cluster-destroy", qa_cluster.TestClusterDestroy)

Also available in: Unified diff