Move unit tests into dedicated directory
This patch moves all of the existing cinder/tests into cinder unit tests. This is being done to make way for the addition of cinder/tests/functional. Yes, this is going to cause significant pain with any changes that haven't merged behind it in terms of rebase, but there's no real alternative. We have to rip the band-aid off at some point, and early in L seems like a great time to do it. Change-Id: I63b0f89474b3c139bdb89589abd85319d2aa61ec
This commit is contained in:
parent
6cbc882742
commit
cbcbc90cf6
@ -120,7 +120,7 @@ def check_assert_called_once(logical_line, filename):
|
|||||||
"once_with to test with explicit parameters or an assertEqual with"
|
"once_with to test with explicit parameters or an assertEqual with"
|
||||||
" call_count.")
|
" call_count.")
|
||||||
|
|
||||||
if 'cinder/tests/' in filename:
|
if 'cinder.functional/tests/' or 'cinder.unit/tests' in filename:
|
||||||
pos = logical_line.find('.assert_called_once(')
|
pos = logical_line.find('.assert_called_once(')
|
||||||
if pos != -1:
|
if pos != -1:
|
||||||
yield (pos, msg)
|
yield (pos, msg)
|
||||||
|
@ -46,8 +46,8 @@ from cinder import i18n
|
|||||||
from cinder import objects
|
from cinder import objects
|
||||||
from cinder import rpc
|
from cinder import rpc
|
||||||
from cinder import service
|
from cinder import service
|
||||||
from cinder.tests import conf_fixture
|
from cinder.tests.unit import conf_fixture
|
||||||
from cinder.tests import fake_notifier
|
from cinder.tests.unit import fake_notifier
|
||||||
|
|
||||||
test_opts = [
|
test_opts = [
|
||||||
cfg.StrOpt('sqlite_clean_db',
|
cfg.StrOpt('sqlite_clean_db',
|
||||||
@ -165,7 +165,7 @@ class TestCase(testtools.TestCase):
|
|||||||
format=log_format,
|
format=log_format,
|
||||||
level=level))
|
level=level))
|
||||||
|
|
||||||
rpc.add_extra_exmods("cinder.tests")
|
rpc.add_extra_exmods("cinder.tests.unit")
|
||||||
self.addCleanup(rpc.clear_extra_exmods)
|
self.addCleanup(rpc.clear_extra_exmods)
|
||||||
self.addCleanup(rpc.cleanup)
|
self.addCleanup(rpc.cleanup)
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ class TestCase(testtools.TestCase):
|
|||||||
'..',
|
'..',
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'cinder/tests/policy.json'))
|
'cinder/tests/unit/policy.json'))
|
||||||
|
|
||||||
def _common_cleanup(self):
|
def _common_cleanup(self):
|
||||||
"""Runs after each test method to tear down test environment."""
|
"""Runs after each test method to tear down test environment."""
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
# Copyright 2010 United States Government as represented by the
|
|
||||||
# Administrator of the National Aeronautics and Space Administration.
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
"""
|
|
||||||
:mod:`cinder.tests` -- Cinder Unittests
|
|
||||||
=====================================================
|
|
||||||
|
|
||||||
.. automodule:: cinder.tests
|
|
||||||
:platform: Unix
|
|
||||||
.. moduleauthor:: Jesse Andrews <jesse@ansolabs.com>
|
|
||||||
.. moduleauthor:: Devin Carlen <devin.carlen@gmail.com>
|
|
||||||
.. moduleauthor:: Vishvananda Ishaya <vishvananda@gmail.com>
|
|
||||||
.. moduleauthor:: Joshua McKenty <joshua@cognition.ca>
|
|
||||||
.. moduleauthor:: Manish Singh <yosh@gimp.org>
|
|
||||||
.. moduleauthor:: Andy Smith <andy@anarkystic.com>
|
|
||||||
"""
|
|
||||||
|
|
||||||
import eventlet
|
|
||||||
|
|
||||||
eventlet.monkey_patch()
|
|
||||||
|
|
||||||
# See http://code.google.com/p/python-nose/issues/detail?id=373
|
|
||||||
# The code below enables nosetests to work with i18n _() blocks
|
|
||||||
import __builtin__
|
|
||||||
setattr(__builtin__, '_', lambda x: x)
|
|
38
cinder/tests/unit/__init__.py
Normal file
38
cinder/tests/unit/__init__.py
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Copyright 2010 United States Government as represented by the
|
||||||
|
# Administrator of the National Aeronautics and Space Administration.
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
"""
|
||||||
|
:mod:`cinder.tests.unit` -- Cinder Unittests
|
||||||
|
=====================================================
|
||||||
|
|
||||||
|
.. automodule:: cinder.tests.unit
|
||||||
|
:platform: Unix
|
||||||
|
.. moduleauthor:: Jesse Andrews <jesse@ansolabs.com>
|
||||||
|
.. moduleauthor:: Devin Carlen <devin.carlen@gmail.com>
|
||||||
|
.. moduleauthor:: Vishvananda Ishaya <vishvananda@gmail.com>
|
||||||
|
.. moduleauthor:: Joshua McKenty <joshua@cognition.ca>
|
||||||
|
.. moduleauthor:: Manish Singh <yosh@gimp.org>
|
||||||
|
.. moduleauthor:: Andy Smith <andy@anarkystic.com>
|
||||||
|
"""
|
||||||
|
|
||||||
|
import eventlet
|
||||||
|
|
||||||
|
eventlet.monkey_patch()
|
||||||
|
|
||||||
|
# See http://code.google.com/p/python-nose/issues/detail?id=373
|
||||||
|
# The code below enables nosetests to work with i18n _() blocks
|
||||||
|
import __builtin__
|
||||||
|
setattr(__builtin__, '_', lambda x: x)
|
@ -28,10 +28,10 @@ from cinder import context
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v2 import stubs
|
from cinder.tests.unit.api.v2 import stubs
|
||||||
from cinder.tests import cast_as_call
|
from cinder.tests.unit import cast_as_call
|
||||||
from cinder.tests import fake_snapshot
|
from cinder.tests.unit import fake_snapshot
|
||||||
from cinder.volume import api as volume_api
|
from cinder.volume import api as volume_api
|
||||||
from cinder.volume.targets import tgt
|
from cinder.volume.targets import tgt
|
||||||
|
|
@ -32,8 +32,8 @@ from cinder import db
|
|||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.i18n import _
|
from cinder.i18n import _
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import utils
|
from cinder.tests.unit import utils
|
||||||
# needed for stubs to work
|
# needed for stubs to work
|
||||||
import cinder.volume
|
import cinder.volume
|
||||||
|
|
@ -29,8 +29,8 @@ from cinder import context
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import utils
|
from cinder.tests.unit import utils
|
||||||
import cinder.volume
|
import cinder.volume
|
||||||
|
|
||||||
|
|
@ -29,9 +29,9 @@ from cinder import db
|
|||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.i18n import _
|
from cinder.i18n import _
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v2 import stubs
|
from cinder.tests.unit.api.v2 import stubs
|
||||||
from cinder.tests import utils
|
from cinder.tests.unit import utils
|
||||||
from cinder.volume import api as volume_api
|
from cinder.volume import api as volume_api
|
||||||
|
|
||||||
|
|
@ -22,9 +22,9 @@ import webob
|
|||||||
from cinder.api.contrib import extended_snapshot_attributes
|
from cinder.api.contrib import extended_snapshot_attributes
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import fake_snapshot
|
from cinder.tests.unit import fake_snapshot
|
||||||
from cinder.tests import fake_volume
|
from cinder.tests.unit import fake_volume
|
||||||
|
|
||||||
|
|
||||||
UUID1 = '00000000-0000-0000-0000-000000000001'
|
UUID1 = '00000000-0000-0000-0000-000000000001'
|
@ -24,8 +24,8 @@ from cinder.api.contrib import qos_specs_manage
|
|||||||
from cinder.api import xmlutil
|
from cinder.api import xmlutil
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import fake_notifier
|
from cinder.tests.unit import fake_notifier
|
||||||
|
|
||||||
|
|
||||||
def stub_qos_specs(id):
|
def stub_qos_specs(id):
|
@ -20,8 +20,8 @@ from oslo_serialization import jsonutils
|
|||||||
import cinder
|
import cinder
|
||||||
from cinder.api.openstack import wsgi
|
from cinder.api.openstack import wsgi
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v2 import stubs
|
from cinder.tests.unit.api.v2 import stubs
|
||||||
|
|
||||||
UUID = fakes.FAKE_UUID
|
UUID = fakes.FAKE_UUID
|
||||||
|
|
@ -19,7 +19,7 @@ import mock
|
|||||||
from cinder.api.contrib import scheduler_stats
|
from cinder.api.contrib import scheduler_stats
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
|
|
||||||
|
|
||||||
def schedule_rpcapi_get_pools(self, context, filters=None):
|
def schedule_rpcapi_get_pools(self, context, filters=None):
|
@ -26,7 +26,7 @@ from cinder import db
|
|||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import policy
|
from cinder import policy
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
|
|
||||||
|
|
||||||
fake_services_list = [
|
fake_services_list = [
|
@ -17,8 +17,8 @@ import webob
|
|||||||
|
|
||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v2 import stubs
|
from cinder.tests.unit.api.v2 import stubs
|
||||||
|
|
||||||
|
|
||||||
class SnapshotActionsTest(test.TestCase):
|
class SnapshotActionsTest(test.TestCase):
|
@ -22,8 +22,8 @@ import webob
|
|||||||
from cinder.api.contrib import types_extra_specs
|
from cinder.api.contrib import types_extra_specs
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import fake_notifier
|
from cinder.tests.unit import fake_notifier
|
||||||
import cinder.wsgi
|
import cinder.wsgi
|
||||||
|
|
||||||
|
|
@ -19,8 +19,8 @@ import webob
|
|||||||
from cinder.api.contrib import types_manage
|
from cinder.api.contrib import types_manage
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import fake_notifier
|
from cinder.tests.unit import fake_notifier
|
||||||
from cinder.volume import volume_types
|
from cinder.volume import volume_types
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@ from cinder.api.contrib import used_limits
|
|||||||
from cinder.api.openstack import wsgi
|
from cinder.api.openstack import wsgi
|
||||||
from cinder import quota
|
from cinder import quota
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
|
|
||||||
|
|
||||||
class FakeRequest(object):
|
class FakeRequest(object):
|
@ -26,8 +26,8 @@ from cinder.api.contrib import volume_actions
|
|||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder.image import glance
|
from cinder.image import glance
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v2 import stubs
|
from cinder.tests.unit.api.v2 import stubs
|
||||||
from cinder import volume
|
from cinder import volume
|
||||||
from cinder.volume import api as volume_api
|
from cinder.volume import api as volume_api
|
||||||
from cinder.volume import rpcapi as volume_rpcapi
|
from cinder.volume import rpcapi as volume_rpcapi
|
@ -21,7 +21,7 @@ from cinder.api.contrib import volume_encryption_metadata
|
|||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.volume import volume_types
|
from cinder.volume import volume_types
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@ import webob
|
|||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder import volume
|
from cinder import volume
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ from cinder.api import common
|
|||||||
from cinder.api.openstack import wsgi
|
from cinder.api.openstack import wsgi
|
||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder import volume
|
from cinder import volume
|
||||||
|
|
||||||
|
|
@ -19,7 +19,7 @@ import webob
|
|||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
|
|
||||||
|
|
||||||
def app():
|
def app():
|
@ -21,7 +21,7 @@ import webob
|
|||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder import volume
|
from cinder import volume
|
||||||
|
|
||||||
|
|
@ -24,8 +24,8 @@ import webob
|
|||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import utils as tests_utils
|
from cinder.tests.unit import utils as tests_utils
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
@ -21,7 +21,7 @@ import webob
|
|||||||
|
|
||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder import volume
|
from cinder import volume
|
||||||
|
|
||||||
|
|
@ -28,7 +28,7 @@ from cinder import context
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder import transfer
|
from cinder import transfer
|
||||||
import cinder.volume
|
import cinder.volume
|
||||||
|
|
@ -21,7 +21,7 @@ from cinder import context
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
|
|
||||||
|
|
||||||
def generate_type(type_id, is_public):
|
def generate_type(type_id, is_public):
|
@ -20,8 +20,8 @@ import webob
|
|||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import fake_notifier
|
from cinder.tests.unit import fake_notifier
|
||||||
|
|
||||||
|
|
||||||
def return_volume_type_encryption(context, volume_type_id):
|
def return_volume_type_encryption(context, volume_type_id):
|
@ -19,7 +19,7 @@ import webob
|
|||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
|
|
||||||
|
|
||||||
# This list of fake volumes is used by our tests. Each is configured in a
|
# This list of fake volumes is used by our tests. Each is configured in a
|
@ -17,7 +17,7 @@ import webob
|
|||||||
from cinder.api.openstack import wsgi
|
from cinder.api.openstack import wsgi
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
|
|
||||||
|
|
||||||
class RequestTest(test.TestCase):
|
class RequestTest(test.TestCase):
|
@ -36,7 +36,7 @@ class ExtensionTestCase(test.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(ExtensionTestCase, self).setUp()
|
super(ExtensionTestCase, self).setUp()
|
||||||
ext_list = CONF.osapi_volume_extension[:]
|
ext_list = CONF.osapi_volume_extension[:]
|
||||||
fox = ('cinder.tests.api.extensions.foxinsocks.Foxinsocks')
|
fox = ('cinder.tests.unit.api.extensions.foxinsocks.Foxinsocks')
|
||||||
if fox not in ext_list:
|
if fox not in ext_list:
|
||||||
ext_list.append(fox)
|
ext_list.append(fox)
|
||||||
self.flags(osapi_volume_extension=ext_list)
|
self.flags(osapi_volume_extension=ext_list)
|
@ -21,7 +21,7 @@ from cinder.api.v1 import snapshots
|
|||||||
from cinder.api.v1 import volumes
|
from cinder.api.v1 import volumes
|
||||||
from cinder.api import versions
|
from cinder.api import versions
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
@ -27,9 +27,9 @@ from cinder import context
|
|||||||
import cinder.db
|
import cinder.db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import fake_snapshot
|
from cinder.tests.unit import fake_snapshot
|
||||||
from cinder.tests import fake_volume
|
from cinder.tests.unit import fake_volume
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
@ -24,10 +24,10 @@ from cinder import context
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v1 import stubs
|
from cinder.tests.unit.api.v1 import stubs
|
||||||
from cinder.tests import fake_snapshot
|
from cinder.tests.unit import fake_snapshot
|
||||||
from cinder.tests import fake_volume
|
from cinder.tests.unit import fake_volume
|
||||||
from cinder import volume
|
from cinder import volume
|
||||||
|
|
||||||
|
|
@ -23,7 +23,7 @@ from cinder.api.v1 import types
|
|||||||
from cinder.api.views import types as views_types
|
from cinder.api.views import types as views_types
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.volume import volume_types
|
from cinder.volume import volume_types
|
||||||
|
|
||||||
|
|
@ -25,8 +25,8 @@ from cinder.api.v1 import volumes
|
|||||||
import cinder.db
|
import cinder.db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v1 import stubs
|
from cinder.tests.unit.api.v1 import stubs
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
@ -27,10 +27,10 @@ from cinder import context
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v2 import stubs
|
from cinder.tests.unit.api.v2 import stubs
|
||||||
from cinder.tests import fake_notifier
|
from cinder.tests.unit import fake_notifier
|
||||||
from cinder.tests.image import fake as fake_image
|
from cinder.tests.unit.image import fake as fake_image
|
||||||
from cinder.volume import api as volume_api
|
from cinder.volume import api as volume_api
|
||||||
|
|
||||||
|
|
@ -27,9 +27,9 @@ from cinder import context
|
|||||||
import cinder.db
|
import cinder.db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests import fake_snapshot
|
from cinder.tests.unit import fake_snapshot
|
||||||
from cinder.tests import fake_volume
|
from cinder.tests.unit import fake_volume
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
@ -24,10 +24,10 @@ from cinder import context
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v2 import stubs
|
from cinder.tests.unit.api.v2 import stubs
|
||||||
from cinder.tests import fake_snapshot
|
from cinder.tests.unit import fake_snapshot
|
||||||
from cinder.tests import fake_volume
|
from cinder.tests.unit import fake_volume
|
||||||
from cinder import volume
|
from cinder import volume
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ from cinder.api.v2 import types
|
|||||||
from cinder.api.views import types as views_types
|
from cinder.api.views import types as views_types
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.volume import volume_types
|
from cinder.volume import volume_types
|
||||||
|
|
||||||
|
|
@ -25,8 +25,8 @@ from cinder.api.v2 import volumes
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v2 import stubs
|
from cinder.tests.unit.api.v2 import stubs
|
||||||
from cinder.volume import api as volume_api
|
from cinder.volume import api as volume_api
|
||||||
|
|
||||||
|
|
@ -30,10 +30,10 @@ from cinder import context
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests.api import fakes
|
from cinder.tests.unit.api import fakes
|
||||||
from cinder.tests.api.v2 import stubs
|
from cinder.tests.unit.api.v2 import stubs
|
||||||
from cinder.tests import fake_notifier
|
from cinder.tests.unit import fake_notifier
|
||||||
from cinder.tests.image import fake as fake_image
|
from cinder.tests.unit.image import fake as fake_image
|
||||||
from cinder.volume import api as volume_api
|
from cinder.volume import api as volume_api
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
@ -16,7 +16,7 @@
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from cinder.backup import driver
|
from cinder.backup import driver
|
||||||
from cinder.tests.backup import fake_service
|
from cinder.tests.unit.backup import fake_service
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
@ -35,20 +35,20 @@ def_vol_type = 'fake_vol_type'
|
|||||||
def set_defaults(conf):
|
def set_defaults(conf):
|
||||||
conf.set_default('default_volume_type', def_vol_type)
|
conf.set_default('default_volume_type', def_vol_type)
|
||||||
conf.set_default('volume_driver',
|
conf.set_default('volume_driver',
|
||||||
'cinder.tests.fake_driver.FakeISCSIDriver')
|
'cinder.tests.unit.fake_driver.FakeISCSIDriver')
|
||||||
conf.set_default('iscsi_helper', 'fake')
|
conf.set_default('iscsi_helper', 'fake')
|
||||||
conf.set_default('rpc_backend', 'cinder.openstack.common.rpc.impl_fake')
|
conf.set_default('rpc_backend', 'cinder.openstack.common.rpc.impl_fake')
|
||||||
conf.set_default('connection', 'sqlite://', group='database')
|
conf.set_default('connection', 'sqlite://', group='database')
|
||||||
conf.set_default('sqlite_synchronous', False, group='database')
|
conf.set_default('sqlite_synchronous', False, group='database')
|
||||||
conf.set_default('policy_file', 'cinder/tests/policy.json')
|
conf.set_default('policy_file', 'cinder.tests.unit/policy.json')
|
||||||
conf.set_default(
|
conf.set_default(
|
||||||
'xiv_ds8k_proxy',
|
'xiv_ds8k_proxy',
|
||||||
'cinder.tests.test_ibm_xiv_ds8k.XIVDS8KFakeProxyDriver')
|
'cinder.tests.unit.test_ibm_xiv_ds8k.XIVDS8KFakeProxyDriver')
|
||||||
conf.set_default('backup_driver', 'cinder.tests.backup.fake_service')
|
conf.set_default('backup_driver', 'cinder.tests.unit.backup.fake_service')
|
||||||
conf.set_default('fixed_key', default='0' * 64, group='keymgr')
|
conf.set_default('fixed_key', default='0' * 64, group='keymgr')
|
||||||
conf.set_default('scheduler_driver',
|
conf.set_default('scheduler_driver',
|
||||||
'cinder.scheduler.filter_scheduler.FilterScheduler')
|
'cinder.scheduler.filter_scheduler.FilterScheduler')
|
||||||
conf.set_default('state_path', os.path.abspath(
|
conf.set_default('state_path', os.path.abspath(
|
||||||
os.path.join(os.path.dirname(__file__), '..', '..')))
|
os.path.join(os.path.dirname(__file__), '..', '..', '..')))
|
||||||
conf.set_default('policy_dirs', [])
|
conf.set_default('policy_dirs', [])
|
||||||
conf.set_default('auth_strategy', 'noauth')
|
conf.set_default('auth_strategy', 'noauth')
|
@ -18,7 +18,7 @@
|
|||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests import utils as testutils
|
from cinder.tests.unit import utils as testutils
|
||||||
|
|
||||||
|
|
||||||
class FinishVolumeMigrationTestCase(test.TestCase):
|
class FinishVolumeMigrationTestCase(test.TestCase):
|
@ -19,7 +19,7 @@ from oslo_config import cfg
|
|||||||
from cinder import context
|
from cinder import context
|
||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests import utils as testutils
|
from cinder.tests.unit import utils as testutils
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
@ -21,7 +21,7 @@ from cinder import context
|
|||||||
from cinder import db
|
from cinder import db
|
||||||
from cinder import exception
|
from cinder import exception
|
||||||
from cinder import test
|
from cinder import test
|
||||||
from cinder.tests import utils
|
from cinder.tests.unit import utils
|
||||||
|
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
@ -15,7 +15,7 @@
|
|||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from cinder.i18n import _LE
|
from cinder.i18n import _LE
|
||||||
from cinder.tests.brick import fake_lvm
|
from cinder.tests.unit.brick import fake_lvm
|
||||||
from cinder.volume import driver
|
from cinder.volume import driver
|
||||||
from cinder.volume.drivers import lvm
|
from cinder.volume.drivers import lvm
|
||||||
from cinder.zonemanager import utils as fczm_utils
|
from cinder.zonemanager import utils as fczm_utils
|
@ -19,7 +19,7 @@ import sys
|
|||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from cinder.tests import fake_hp_client_exceptions as hpexceptions
|
from cinder.tests.unit import fake_hp_client_exceptions as hpexceptions
|
||||||
|
|
||||||
hp3par = mock.Mock()
|
hp3par = mock.Mock()
|
||||||
hp3par.version = "3.1.2"
|
hp3par.version = "3.1.2"
|
@ -19,7 +19,7 @@ import sys
|
|||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
from cinder.tests import fake_hp_client_exceptions as hpexceptions
|
from cinder.tests.unit import fake_hp_client_exceptions as hpexceptions
|
||||||
|
|
||||||
hplefthand = mock.Mock()
|
hplefthand = mock.Mock()
|
||||||
hplefthand.version = "1.0.4"
|
hplefthand.version = "1.0.4"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user