Пример #1
0
 def testDrbdHelperNone(self):
   opts = mock.Mock()
   self.enableDrbd()
   opts.drbd_helper = None
   helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates,
                                        feedback_fn=mock.Mock())
   self.assertEquals(constants.DEFAULT_DRBD_HELPER, helper)
Пример #2
0
 def testDrbdHelper(self):
   opts = mock.Mock()
   self.enableDrbd()
   opts.drbd_helper = "/bin/true"
   helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates,
                                        feedback_fn=mock.Mock())
   self.assertEquals(opts.drbd_helper, helper)
Пример #3
0
 def testNoDrbdNoHelper(self):
   opts = mock.Mock()
   opts.drbd_helper = None
   self.disableDrbd()
   helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates,
                                        feedback_fn=mock.Mock())
   self.assertEquals(None, helper)