From: Michal Dulko Date: Thu, 16 Jul 2015 10:55:44 +0000 (+0200) Subject: Add consistency group tests to test_volume_rpcapi X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=f6d531bf56f080fc7a6ea6ba63f08be249b50a51;p=openstack-build%2Fcinder-build.git Add consistency group tests to test_volume_rpcapi test_volume_rpcapi was missing tests for RPC calls related to consistency groups. This commit adds them. Change-Id: I08a1337467742c8ce2b24c9382df537841bdbcb2 --- diff --git a/cinder/tests/unit/test_volume_rpcapi.py b/cinder/tests/unit/test_volume_rpcapi.py index 546ca5dc3..7effbbd08 100644 --- a/cinder/tests/unit/test_volume_rpcapi.py +++ b/cinder/tests/unit/test_volume_rpcapi.py @@ -193,6 +193,30 @@ class VolumeRpcAPITestCase(test.TestCase): else: self.assertEqual(expected_msg[kwarg], value) + def test_create_consistencygroup(self): + self._test_volume_api('create_consistencygroup', rpc_method='cast', + group=self.fake_cg, host='fake_host1', + version='1.26') + + def test_delete_consistencygroup(self): + self._test_volume_api('delete_consistencygroup', rpc_method='cast', + group=self.fake_cg, version='1.26') + + def test_update_consistencygroup(self): + self._test_volume_api('update_consistencygroup', rpc_method='cast', + group=self.fake_cg, add_volumes=['vol1'], + remove_volumes=['vol2'], version='1.26') + + def test_create_cgsnapshot(self): + self._test_volume_api('create_cgsnapshot', rpc_method='cast', + group=self.fake_cg, + cgsnapshot=self.fake_cgsnap, version='1.26') + + def test_delete_cgsnapshot(self): + self._test_volume_api('delete_cgsnapshot', rpc_method='cast', + cgsnapshot=self.fake_cgsnap, host='fake_host1', + version='1.18') + def test_create_volume(self): self._test_volume_api('create_volume', rpc_method='cast',