Add a few tests for OpParams types
As OpParams definitions are used at Template Haskell type, they don'tget any coverage (although the values defined by them are actuallyused in unittests). However, we can at least test some of thefunctions defined in the module....
Add description to personality definitions
This allows usage information to display nicer help (like in Python).
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michele Tartara <mtartara@google.com>
Allow shutting down offline instance
If an instance is offline we definitely shouldn't start it up.But shutting it down, should it be up by mistake is not "that" bad.Still, we only allow it with --force, as it still performs an action onan instance we shouldn't touch. This should make everybody happy....
Haskell/python compatibility test for networks
This patch contains the HUnit test that checks the compatibilityof Haskell-generated networks with the python code. For that thegeneration of test instances of networks was enhanced to meetthe validation steps of the python implementation. Also, so far...
Split and extend Confd types tests
Some confd types were not tested for serialisation, so let's movethese (type-related) tests to their own module and extend them.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Helga Velroyen <helgav@google.com>
Generalise the test helper 'genUniquesList'
Instead of always using "arbitrary", make it require a generator (thatcan then use more complex rules for building the list elements), andalso convert it to use a temporary set instead of list membership.
Signed-off-by: Iustin Pop <iustin@google.com>...
Implement opcode summary support
This implements in the Haskell codebase the opcode summary. As opposedto Python, we always use custom code for formatting, since we don'twant to use dynamic attribute lookup.
To test this properly, we need to change MetaOpCode to record-syntax,...
Add a type for the log type in job/opcode logs
Also fixes indentation for OP_STATUS.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Guido Trotter <ultrotter@google.com>
Improve a few Graph test properties
Return type is changed from Property to Bool, and the ==? True at theend is dropped.
Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Remove usage of reserved key word 'family'
An old hlint version (1.8.28) was complaining about theword 'family' being used in the network tests. Thanks toan epiphany of Iustin this was due to that it is a reservedkey word.
Signed-off-by: Helga Velroyen <helgav@google.com>...
View revisions
Also available in: Atom