Revision 70e8dd0a test/py/cmdlib/cluster_unittest.py

b/test/py/cmdlib/cluster_unittest.py
481 481

  
482 482
    self.mcpu.assertLogContainsRegex("file storage dir already set to value")
483 483

  
484
  def testUnsetFileStorageDirFileStorageEnabled(self):
485
    self.cfg.SetEnabledDiskTemplates([constants.DT_FILE])
486
    op = opcodes.OpClusterSetParams(file_storage_dir='')
487
    self.ExecOpCodeExpectOpPrereqError(op, "Unsetting the 'file' storage")
488

  
489
  def testUnsetFileStorageDirFileStorageDisabled(self):
490
    self.cfg.SetEnabledDiskTemplates([constants.DT_PLAIN])
491
    op = opcodes.OpClusterSetParams(file_storage_dir='')
492
    self.ExecOpCode(op)
493

  
494
  def testSetFileStorageDirFileStorageDisabled(self):
495
    self.cfg.SetEnabledDiskTemplates([constants.DT_PLAIN])
496
    op = opcodes.OpClusterSetParams(file_storage_dir='/some/path/')
497
    self.ExecOpCode(op)
498
    self.mcpu.assertLogContainsRegex("although file storage is not enabled")
499

  
484 500
  def testValidDrbdHelper(self):
485 501
    node1 = self.cfg.AddNewNode()
486 502
    node1.offline = True

Also available in: Unified diff