Revision 5949c31c qa/qa_node.py

b/qa/qa_node.py
113 113
def TestNodeStorage():
114 114
  """gnt-node storage"""
115 115
  master = qa_config.GetMasterNode()
116
  enabled_disk_templates = qa_config.GetEnabledDiskTemplates()
117 116

  
118 117
  # FIXME: test all storage_types in constants.VALID_STORAGE_TYPES
119 118
  # as soon as they are implemented.
120
  for storage_type in [constants.ST_FILE, constants.ST_LVM_VG,
121
                       constants.ST_LVM_PV]:
119
  enabled_storage_types = qa_config.GetEnabledStorageTypes()
120
  testable_storage_types = list(set(enabled_storage_types).intersection(
121
      set([constants.ST_FILE, constants.ST_LVM_VG, constants.ST_LVM_PV])))
122 122

  
123
    cmd = ["gnt-node", "list-storage", "--storage-type", storage_type]
123
  for storage_type in testable_storage_types:
124 124

  
125
    # Skip file storage if not enabled, otherwise QA will fail; we
126
    # just test for basic failure, but otherwise skip the rest of the
127
    # tests
128
    if storage_type == constants.ST_FILE and not \
129
        ((constants.DT_FILE in enabled_disk_templates) or
130
         (constants.DT_SHARED_FILE in enabled_disk_templates)):
131
      AssertCommand(cmd, fail=True)
132
      continue
125
    cmd = ["gnt-node", "list-storage", "--storage-type", storage_type]
133 126

  
134 127
    # Test simple list
135 128
    AssertCommand(cmd)

Also available in: Unified diff