Revision 25231ec5 test/ganeti.hooks_unittest.py
b/test/ganeti.hooks_unittest.py | ||
---|---|---|
39 | 39 |
|
40 | 40 |
from mocks import FakeConfig, FakeProc, FakeContext |
41 | 41 |
|
42 |
import testutils |
|
43 |
|
|
44 |
|
|
42 | 45 |
class FakeLU(cmdlib.LogicalUnit): |
43 | 46 |
HPATH = "test" |
44 | 47 |
def BuildHooksEnv(self): |
45 | 48 |
return {}, ["localhost"], ["localhost"] |
46 | 49 |
|
50 |
|
|
47 | 51 |
class TestHooksRunner(unittest.TestCase): |
48 | 52 |
"""Testing case for HooksRunner""" |
49 | 53 |
def setUp(self): |
... | ... | |
266 | 270 |
for phase in (constants.HOOKS_PHASE_PRE, constants.HOOKS_PHASE_POST): |
267 | 271 |
hm.RunPhase(phase) |
268 | 272 |
|
273 |
|
|
269 | 274 |
if __name__ == '__main__': |
270 |
unittest.main() |
|
275 |
testutils.GanetiTestProgram() |
Also available in: Unified diff