Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
import unittest
from ganeti import mcpu
+from ganeti import opcodes
import testutils
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()