Commit 0a31dda0 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Add consistency test for mcpu dispatch table

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 18e63b75
......@@ -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:
self.assert_(opcls in mcpu.Processor.DISPATCH_TABLE,
msg="%s missing handler class" % opcls)
if __name__ == "__main__":
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment