]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixed some FCZM unit tests hacking issues
authorWalter A. Boring IV <walter.boring@hp.com>
Mon, 10 Mar 2014 17:27:43 +0000 (10:27 -0700)
committerWalter A. Boring IV <walter.boring@hp.com>
Wed, 12 Mar 2014 16:49:01 +0000 (09:49 -0700)
This patch is a follow up to a review that merged
included and had some issues raised after it was merged.
This patch includes some hacking cleanup and some
unit test cleanup for the Fibre Channel Zone Manager.

Change-Id: Ibb6974b2279f08720c2469893245bc888d35899c
Closes-Bug: #1285029

cinder/tests/zonemanager/__init__.py
cinder/tests/zonemanager/test_brcd_fc_san_lookup_service.py
cinder/tests/zonemanager/test_volume_manager_fc.py

index 31285c4fc2153e1d3f7c18d25c5a09aa8a300364..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,14 +0,0 @@
-# Copyright 2011 OpenStack Foundation
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
index 52ba43fd6fdd8074c8b1ad7eaac56adbb2747d7f..ca9c3a8920fea2434db9233ed2fb4a1ff8aeb126 100644 (file)
@@ -73,9 +73,8 @@ class TestBrcdFCSanLookupService(brcd_lookup.BrcdFCSanLookupService,
                                          default=22, help=''))
         fc_fabric_opts.append(cfg.StrOpt('principal_switch_wwn',
                                          default='100000051e55a100', help=''))
-        self.fabric_configs = {}
         config = conf.Configuration(fc_fabric_opts, 'BRCD_FAB_2')
-        self.fabric_configs['BRCD_FAB_2'] = config
+        self.fabric_configs = {'BRCD_FAB_2': config}
 
     @mock.patch.object(brcd_lookup.BrcdFCSanLookupService,
                        'get_nameserver_info')
index d44a4a7e50fca872a245c921bfac66475d0d7e08..a4d3ce3a5d41429b55f51b6ba44b678d8ab5e9b7 100644 (file)
@@ -71,6 +71,13 @@ class TestVolumeManager(manager.VolumeManager, test.TestCase):
         self.zonemanager = fc_zone_manager.ZoneManager(
             configuration=self.configuration)
 
+    def tearDown(self):
+        super(TestVolumeManager, self).tearDown()
+        self.configuration = None
+        self.db = None
+        self.driver = None
+        self.zonemanager = None
+
     def __init__(self, *args, **kwargs):
         test.TestCase.__init__(self, *args, **kwargs)