From 1a1e4cfddccf45a4eb35ac5f98744970f3111c5c Mon Sep 17 00:00:00 2001 From: Xing Yang Date: Fri, 7 Aug 2015 18:02:21 -0400 Subject: [PATCH] Remove bad tests for the VMAX driver 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 | 35 ------------------------------ 1 file changed, 35 deletions(-) diff --git a/cinder/tests/unit/test_emc_vmax.py b/cinder/tests/unit/test_emc_vmax.py index 4652eb889..ebc1eabcc 100644 --- a/cinder/tests/unit/test_emc_vmax.py +++ b/cinder/tests/unit/test_emc_vmax.py @@ -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 -- 2.45.2