Merge branch 'stable-2.15' into stable-2.16
[ganeti-github.git] / test / py / ganeti.client.gnt_cluster_unittest.py
index c2cb9f5..38bda23 100755 (executable)
@@ -293,21 +293,24 @@ class InitDrbdHelper(DrbdHelperTestCase):
     opts = mock.Mock()
     opts.drbd_helper = None
     self.disableDrbd()
     opts = mock.Mock()
     opts.drbd_helper = None
     self.disableDrbd()
-    helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates)
+    helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates,
+                                         feedback_fn=mock.Mock())
     self.assertEquals(None, helper)
 
   def testNoDrbdHelper(self):
     opts = mock.Mock()
     self.disableDrbd()
     opts.drbd_helper = "/bin/true"
     self.assertEquals(None, helper)
 
   def testNoDrbdHelper(self):
     opts = mock.Mock()
     self.disableDrbd()
     opts.drbd_helper = "/bin/true"
-    helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates)
+    helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates,
+                                         feedback_fn=mock.Mock())
     self.assertEquals(opts.drbd_helper, helper)
 
   def testDrbdHelperNone(self):
     opts = mock.Mock()
     self.enableDrbd()
     opts.drbd_helper = None
     self.assertEquals(opts.drbd_helper, helper)
 
   def testDrbdHelperNone(self):
     opts = mock.Mock()
     self.enableDrbd()
     opts.drbd_helper = None
-    helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates)
+    helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates,
+                                         feedback_fn=mock.Mock())
     self.assertEquals(constants.DEFAULT_DRBD_HELPER, helper)
 
   def testDrbdHelperEmpty(self):
     self.assertEquals(constants.DEFAULT_DRBD_HELPER, helper)
 
   def testDrbdHelperEmpty(self):
@@ -315,13 +318,14 @@ class InitDrbdHelper(DrbdHelperTestCase):
     self.enableDrbd()
     opts.drbd_helper = ''
     self.assertRaises(errors.OpPrereqError, gnt_cluster._InitDrbdHelper, opts,
     self.enableDrbd()
     opts.drbd_helper = ''
     self.assertRaises(errors.OpPrereqError, gnt_cluster._InitDrbdHelper, opts,
-        self.enabled_disk_templates)
+        self.enabled_disk_templates, feedback_fn=mock.Mock())
 
   def testDrbdHelper(self):
     opts = mock.Mock()
     self.enableDrbd()
     opts.drbd_helper = "/bin/true"
 
   def testDrbdHelper(self):
     opts = mock.Mock()
     self.enableDrbd()
     opts.drbd_helper = "/bin/true"
-    helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates)
+    helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates,
+                                         feedback_fn=mock.Mock())
     self.assertEquals(opts.drbd_helper, helper)
 
 
     self.assertEquals(opts.drbd_helper, helper)