History | View | Annotate | Download (8.7 kB)
Generalize the OpCode-should-be-in-mcpu test
Currently, the unittest TestDispatchTable in mcpu unittest does ahard-coded approach to test whether an opcode should be included ornot in the mcpu.Processor dispatch table. This is not flexible, so wereplace it with two changes:...
Improve opcode summary tests
Test full summary instead of just format.
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Migrate code verifying opcode parameters to base class
This allows the function to be used in other places as well.An optional parameter is added to control whether defaultvalues should be set. Unittests are added, providing fullcoverage.
Signed-off-by: Michael Hanselmann <hansmi@google.com>...
Improve tests for OP_ID
… by detecting duplicates.
opcodes: Add opcode parameter definitions
This is the first step for migrating them from cmdlib. A metaclass isused to define “__slots__” upon class creation time (not instantiation).
Add unittests for ganeti.opcodes
According to “coverage”, this covers 99% of the code.