diff --git a/test/ganeti.mcpu_unittest.py b/test/ganeti.mcpu_unittest.py index bdfd3a2755f09adec3ac4c4f202d8fff7ad87ce8..9f5687068491edb057d43787a824546097323598 100755 --- a/test/ganeti.mcpu_unittest.py +++ b/test/ganeti.mcpu_unittest.py @@ -25,6 +25,7 @@ import unittest from ganeti import mcpu +from ganeti import opcodes import testutils @@ -54,5 +55,14 @@ class TestLockAttemptTimeoutStrategy(unittest.TestCase): self.assert_(strat.NextAttempt() is None) +class TestDispatchTable(unittest.TestCase): + def test(self): + for opcls in opcodes.OP_MAPPING.values(): + if opcls is opcodes.OpCode or opcls is opcodes.OpTestDummy: + continue + self.assert_(opcls in mcpu.Processor.DISPATCH_TABLE, + msg="%s missing handler class" % opcls) + + if __name__ == "__main__": testutils.GanetiTestProgram()