def testDrbdHelper(self):
   opts = mock.Mock()
   self.enableDrbd()
   opts.drbd_helper = "/bin/true"
   helper = gnt_cluster._GetDrbdHelper(opts, self.enabled_disk_templates)
   self.assertEquals(opts.drbd_helper, helper)
 def testNoDrbdHelper(self):
   opts = mock.Mock()
   self.disableDrbd()
   opts.drbd_helper = "/bin/true"
   helper = gnt_cluster._GetDrbdHelper(opts, None)
   self.assertEquals(opts.drbd_helper, helper)
 def testDrbdNoHelper(self):
   opts = mock.Mock()
   self.enableDrbd()
   opts.drbd_helper = None
   helper = gnt_cluster._GetDrbdHelper(opts, self.enabled_disk_templates)
   self.assertEquals(None, helper)
 def testNoTemplateInfoNoHelper(self):
   opts = mock.Mock()
   opts.drbd_helper = None
   helper = gnt_cluster._GetDrbdHelper(opts, None)
   self.assertEquals(None, helper)
 def testNoTemplateInfoHelper(self):
   opts = mock.Mock()
   opts.drbd_helper = "/bin/true"
   helper = gnt_cluster._GetDrbdHelper(opts, None)
   self.assertEquals(opts.drbd_helper, helper)
예제 #6
0
 def testDrbdHelper(self):
     opts = mock.Mock()
     self.enableDrbd()
     opts.drbd_helper = "/bin/true"
     helper = gnt_cluster._GetDrbdHelper(opts, self.enabled_disk_templates)
     self.assertEqual(opts.drbd_helper, helper)
예제 #7
0
 def testDrbdNoHelper(self):
     opts = mock.Mock()
     self.enableDrbd()
     opts.drbd_helper = None
     helper = gnt_cluster._GetDrbdHelper(opts, self.enabled_disk_templates)
     self.assertEqual(None, helper)
예제 #8
0
 def testNoDrbdHelper(self):
     opts = mock.Mock()
     self.disableDrbd()
     opts.drbd_helper = "/bin/true"
     helper = gnt_cluster._GetDrbdHelper(opts, None)
     self.assertEqual(opts.drbd_helper, helper)
예제 #9
0
 def testNoTemplateInfoHelper(self):
     opts = mock.Mock()
     opts.drbd_helper = "/bin/true"
     helper = gnt_cluster._GetDrbdHelper(opts, None)
     self.assertEqual(opts.drbd_helper, helper)
예제 #10
0
 def testNoTemplateInfoNoHelper(self):
     opts = mock.Mock()
     opts.drbd_helper = None
     helper = gnt_cluster._GetDrbdHelper(opts, None)
     self.assertEqual(None, helper)