]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add consistency group tests to test_volume_rpcapi
authorMichal Dulko <michal.dulko@intel.com>
Thu, 16 Jul 2015 10:55:44 +0000 (12:55 +0200)
committerMichal Dulko <michal.dulko@intel.com>
Tue, 25 Aug 2015 07:19:50 +0000 (07:19 +0000)
test_volume_rpcapi was missing tests for RPC calls related to
consistency groups. This commit adds them.

Change-Id: I08a1337467742c8ce2b24c9382df537841bdbcb2

cinder/tests/unit/test_volume_rpcapi.py

index 546ca5dc323cb261f1fbfafdf4ad5a68dc1fee27..7effbbd08ac530edca522ee559f3f70c6f6f88e9 100644 (file)
@@ -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',