]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove bad tests for the VMAX driver
authorXing Yang <xing.yang@emc.com>
Fri, 7 Aug 2015 22:02:21 +0000 (18:02 -0400)
committerXing Yang <xing.yang@emc.com>
Fri, 7 Aug 2015 22:02:21 +0000 (18:02 -0400)
There are a few tests for the VMAX driver that are causing lots of
unit test failures on various patches. I think the reason is several
tests are using the config file with the same name which is created
during setup and deleted at cleanup. When concurrency is > 1, one test
could have deleted the file while another test is trying to read from
it. So the unit tests need to be re-designed to isolate the impact on
each other. This will be worked on. For the short term, I want to
remove the bad tests to reduce the number of unit test failures on
other patches.

Change-Id: Icd0ecf5ed184a81350e25ef0c8df3c3d400def98

cinder/tests/unit/test_emc_vmax.py

index 4652eb88914dbb60fcc3087db8ebf87b282dcbaa..ebc1eabcc1175cd885079769d0e86a1d410a5edb 100644 (file)
@@ -5127,18 +5127,6 @@ class EMCV3DriverTestCase(test.TestCase):
                 'isV3': True,
                 'portgroupname': 'OS-portgroup-PG'}
 
-    def test_initial_setup(self):
-        self.driver.common._register_config_file_from_config_group = (
-            mock.Mock(return_value=self.config_file_path))
-        extraSpecs = (
-            self.driver.common._initial_setup(self.data.test_volume_v3))
-        self.assertEqual('SRP_1', extraSpecs['storagetype:pool'])
-        self.assertEqual('DSS', extraSpecs['storagetype:workload'])
-        self.assertEqual('Bronze', extraSpecs['storagetype:slo'])
-        self.assertEqual('1234567891011', extraSpecs['storagetype:array'])
-        self.assertEqual('OS-portgroup-PG', extraSpecs['portgroupname'])
-        self.assertTrue(extraSpecs['isV3'])
-
     @mock.patch.object(
         emc_vmax_utils.EMCVMAXUtils,
         'isArrayV3',
@@ -5796,18 +5784,6 @@ class EMCV2MultiPoolDriverTestCase(test.TestCase):
                 'isV3': False,
                 'portgroupname': u'OS-portgroup-PG'}
 
-    def test_initial_setup(self):
-        self.driver.common._register_config_file_from_config_group = (
-            mock.Mock(return_value=self.config_file_path))
-        extraSpecs = self.driver.common._initial_setup(self.vol_v2)
-        self.assertEqual('gold', extraSpecs['storagetype:pool'])
-        self.assertEqual(None, extraSpecs['storagetype:fastpolicy'])
-        self.assertEqual('concatenated',
-                         extraSpecs['storagetype:compositetype'])
-        self.assertEqual('1234567891011', extraSpecs['storagetype:array'])
-        self.assertEqual('OS-portgroup-PG', extraSpecs['portgroupname'])
-        self.assertFalse(extraSpecs['isV3'])
-
     def test_validate_pool(self):
         v2_valid_pool = self.data.test_volume_v2.copy()
         # Pool aware scheduler enabled
@@ -6097,17 +6073,6 @@ class EMCV3MultiSloDriverTestCase(test.TestCase):
                 'isV3': True,
                 'portgroupname': u'OS-portgroup-PG'}
 
-    def test_initial_setup(self):
-        self.driver.common._register_config_file_from_config_group = (
-            mock.Mock(return_value=self.config_file_path))
-        extraSpecs = self.driver.common._initial_setup(self.vol_v3)
-        self.assertEqual('SRP_1', extraSpecs['storagetype:pool'])
-        self.assertEqual('DSS', extraSpecs['storagetype:workload'])
-        self.assertEqual('Bronze', extraSpecs['storagetype:slo'])
-        self.assertEqual('1234567891011', extraSpecs['storagetype:array'])
-        self.assertEqual('OS-portgroup-PG', extraSpecs['portgroupname'])
-        self.assertTrue(extraSpecs['isV3'])
-
     def test_validate_pool(self):
         v3_valid_pool = self.data.test_volume_v3.copy()
         # Pool aware scheduler enabled