Revision 725ec2f1 qa/ganeti-qa.py

b/qa/ganeti-qa.py
38 38
import qa_tags
39 39
import qa_utils
40 40

  
41
from ganeti import utils
42

  
41 43

  
42 44
def RunTest(fn, *args):
43 45
  """Runs a test after printing a header.
......
70 72
  RunTest(qa_env.TestGanetiCommands)
71 73

  
72 74

  
73
def SetupCluster():
75
def SetupCluster(rapi_user, rapi_secret):
74 76
  """Initializes the cluster.
75 77

  
78
  @param rapi_user: Login user for RAPI
79
  @param rapi_secret: Login secret for RAPI
80

  
76 81
  """
77 82
  if qa_config.TestEnabled('create-cluster'):
78
    RunTest(qa_cluster.TestClusterInit)
83
    RunTest(qa_cluster.TestClusterInit, rapi_user, rapi_secret)
79 84
    RunTest(qa_node.TestNodeAddAll)
80 85
  else:
81 86
    # consider the nodes are already there
......
274 279

  
275 280
  qa_config.Load(config_file)
276 281

  
282
  rapi_user = "ganeti-qa"
283
  rapi_secret = utils.GenerateSecret()
284
  qa_rapi.OpenerFactory.SetCredentials(rapi_user, rapi_secret)
285

  
277 286
  RunEnvTests()
278
  SetupCluster()
287
  SetupCluster(rapi_user, rapi_secret)
279 288
  RunClusterTests()
280 289
  RunOsTests()
281 290

  

Also available in: Unified diff