[Kimchi-devel] [PATCH][Kimchi 5/5] Add test to check bootorder

Rodrigo Trujillo rodrigo.trujillo at linux.vnet.ibm.com
Tue Jun 7 13:10:26 UTC 2016


If you add  the ENUM to the Json schema, you can add tests to test:
- wrong object type, like number instead of list
- wrong parameters , like ['bla', 'ble', 'hd']

Rodrigo

On 06/06/2016 06:13 PM, Ramon Medeiros wrote:
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
>   tests/test_model.py | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/tests/test_model.py b/tests/test_model.py
> index f4a145f..04c20df 100644
> --- a/tests/test_model.py
> +++ b/tests/test_model.py
> @@ -1125,6 +1125,11 @@ class ModelTests(unittest.TestCase):
>               self.assertEquals([], inst.vm_lookup(u'пeω-∨м')['users'])
>               self.assertEquals([], inst.vm_lookup(u'пeω-∨м')['groups'])
>   
> +            # change bootorder
> +            b_order = ["hd", "network", "cdrom"]
> +            inst.vm_update(u'пeω-∨м', {"boot":{"order":b_order}})
> +            self.assertEquals(b_order, inst.vm_lookup(u'пeω-∨м')['boot'])
> +
>       def test_get_interfaces(self):
>           inst = model.Model('test:///default',
>                              objstore_loc=self.tmp_store)




More information about the Kimchi-devel mailing list