Fixed some FCZM unit tests hacking issues

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
This commit is contained in:
Walter A. Boring IV 2014-03-10 10:27:43 -07:00
parent 174be8249b
commit 6d9bb4bdc9
3 changed files with 8 additions and 16 deletions

View 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.

View 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')

View 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)