Revision bab4f56a qa/qa_rapi.py

b/qa/qa_rapi.py
246 246
  """Testing resource queries via remote API.
247 247

  
248 248
  """
249
  # FIXME: the tests are failing if no LVM is enabled, investigate
250
  # if it is a bug in the QA or in the code
251
  if not qa_config.IsStorageTypeSupported(constants.ST_LVM_VG):
252
    return
253

  
249 254
  master_name = qa_utils.ResolveNodeName(qa_config.GetMasterNode())
250 255
  rnd = random.Random(7818)
251 256

  
......
323 328
      ("/2/query/%s?fields=%s" % (what, namefield),
324 329
       compat.partial(_Check, [namefield]), "PUT", {}),
325 330

  
326
      # Fields in body
331
      ("/2/query/%s" % what, compat.partial(_Check, [namefield] * 4), "PUT", {
332
         "fields": [namefield] * 4,
333
         }),
334

  
327 335
      ("/2/query/%s" % what, compat.partial(_Check, all_fields), "PUT", {
328 336
         "fields": all_fields,
329 337
         }),
330 338

  
331 339
      ("/2/query/%s" % what, compat.partial(_Check, [namefield] * 4), "PUT", {
332
         "fields": [namefield] * 4,
333
         }),
334
      ])
340
         "fields": [namefield] * 4
341
         })])
335 342

  
336 343
    def _CheckFilter():
337 344
      _DoTests([
......
562 569

  
563 570
def TestRapiInstanceAdd(node, use_client):
564 571
  """Test adding a new instance via RAPI"""
572
  if not qa_config.IsTemplateSupported(constants.DT_PLAIN):
573
    return
565 574
  instance = qa_config.AcquireInstance()
566 575
  instance.SetDiskTemplate(constants.DT_PLAIN)
567 576
  try:
......
614 623
@InstanceCheck(None, INST_DOWN, FIRST_ARG)
615 624
def TestRapiInstanceRemove(instance, use_client):
616 625
  """Test removing instance via RAPI"""
626
  # FIXME: this does not work if LVM is not enabled. Find out if this is a bug
627
  # in RAPI or in the test
628
  if not qa_config.IsStorageTypeSupported(constants.ST_LVM_VG):
629
    return
630

  
617 631
  if use_client:
618 632
    job_id = _rapi_client.DeleteInstance(instance.name)
619 633
  else:

Also available in: Unified diff