Revision 4b5e8271 test/ganeti.hooks_unittest.py

b/test/ganeti.hooks_unittest.py
240 240

  
241 241
  def testTotalFalse(self):
242 242
    """Test complete rpc failure"""
243
    hm = mcpu.HooksMaster(self._call_false, FakeProc(), self.lu)
243
    hm = mcpu.HooksMaster(self._call_false, self.lu)
244 244
    self.failUnlessRaises(errors.HooksFailure,
245 245
                          hm.RunPhase, constants.HOOKS_PHASE_PRE)
246 246
    hm.RunPhase(constants.HOOKS_PHASE_POST)
247 247

  
248 248
  def testIndividualFalse(self):
249 249
    """Test individual node failure"""
250
    hm = mcpu.HooksMaster(self._call_nodes_false, FakeProc(), self.lu)
250
    hm = mcpu.HooksMaster(self._call_nodes_false, self.lu)
251 251
    hm.RunPhase(constants.HOOKS_PHASE_PRE)
252 252
    #self.failUnlessRaises(errors.HooksFailure,
253 253
    #                      hm.RunPhase, constants.HOOKS_PHASE_PRE)
......
255 255

  
256 256
  def testScriptFalse(self):
257 257
    """Test individual rpc failure"""
258
    hm = mcpu.HooksMaster(self._call_script_fail, FakeProc(), self.lu)
258
    hm = mcpu.HooksMaster(self._call_script_fail, self.lu)
259 259
    self.failUnlessRaises(errors.HooksAbort,
260 260
                          hm.RunPhase, constants.HOOKS_PHASE_PRE)
261 261
    hm.RunPhase(constants.HOOKS_PHASE_POST)
262 262

  
263 263
  def testScriptSucceed(self):
264 264
    """Test individual rpc failure"""
265
    hm = mcpu.HooksMaster(self._call_script_succeed, FakeProc(), self.lu)
265
    hm = mcpu.HooksMaster(self._call_script_succeed, self.lu)
266 266
    for phase in (constants.HOOKS_PHASE_PRE, constants.HOOKS_PHASE_POST):
267 267
      hm.RunPhase(phase)
268 268

  

Also available in: Unified diff