[Kimchi-devel] [PATCH] [Kimchi 2/2] Add tests for disk creation with specified bus driver
Aline Manera
alinefm at linux.vnet.ibm.com
Tue Mar 7 14:41:57 UTC 2017
Ramon, add tests using the REST API too.
On 03/03/2017 05:33 PM, Ramon Medeiros wrote:
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
> tests/test_model.py | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/tests/test_model.py b/tests/test_model.py
> index e49e556..03101f6 100644
> --- a/tests/test_model.py
> +++ b/tests/test_model.py
> @@ -808,6 +808,17 @@ class ModelTests(unittest.TestCase):
> self.assertRaises(InvalidParameter, inst.vmstorages_create,
> vm_name, cdrom_args)
>
> + # try add disk with specified bus
> + disk_args = {"type": "disk",
> + "pool": pool,
> + "vol": vol,
> + "bus": "scsi"}
> + disk = inst.vmstorages_create(vm_name, disk_args)
> + disk_info = inst.vmstorage_lookup(vm_name, disk)
> + self.assertEquals("scsi", disk_info['bus'])
> + self.assertTrue(disk_info["dev"].startswith("sd"))
> + inst.vmstorage_delete(vm_name, disk)
> +
> # Cold plug and unplug a disk
> disk = _attach_disk()
> inst.vmstorage_delete(vm_name, disk)
More information about the Kimchi-devel
mailing list