Move vmware_nsx/neutron/tests to vmware_nsx/tests

This is part of new vmware_nsx directory structure proposed in
https://goo.gl/GdWXyH.

Change-Id: I86262470a03c520bf8fe0f5129d940107701004f
This commit is contained in:
Shih-Hao Li 2015-09-14 18:08:51 -07:00
parent 128996f3f9
commit 8918b10b67
95 changed files with 60 additions and 60 deletions

View File

@ -1,4 +1,4 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./vmware_nsx/neutron/tests/unit} $LISTOPT $IDOPTION
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./vmware_nsx/tests/unit} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -125,13 +125,13 @@ For executing a specific test case, specify the name of the test case
class separating it from the module path with a colon.
For example, the following would run only the TestSubnetsV2 tests from
vmware_nsx/neutron/tests/unit/vmware/test_nsx_v_plugin.py::
vmware_nsx/tests/unit/vmware/test_nsx_v_plugin.py::
$ ./run_tests.sh vmware_nsx.neutron.tests.unit.vmware.test_nsx_v_plugin.TestSubnetsV2
$ ./run_tests.sh vmware_nsx.tests.unit.vmware.test_nsx_v_plugin.TestSubnetsV2
or::
$ tox -e py27 vmware_nsx.neutron.tests.unit.vmware.test_nsx_v_plugin.TestSubnetsV2
$ tox -e py27 vmware_nsx.tests.unit.vmware.test_nsx_v_plugin.TestSubnetsV2
Adding more tests
~~~~~~~~~~~~~~~~~

View File

@ -114,7 +114,7 @@ function run_tests {
if [ "$testopts" = "" ] && [ "$testargs" = "" ]; then
# Default to running all tests if specific test is not
# provided.
testargs="discover ./vmware_nsx/neutron/tests"
testargs="discover ./vmware_nsx/tests"
fi
${wrapper} python -m testtools.run $testopts $testargs

View File

@ -92,4 +92,4 @@ msg_format_checkers = [
]
file_black_list = ["./vmware_nsx/neutron/tests/unit"]
file_black_list = ["./vmware_nsx/tests/unit"]

View File

@ -29,7 +29,7 @@ setenv = VIRTUAL_ENV={envdir}
setenv = OS_TEST_TIMEOUT=90
deps =
{[testenv]deps}
-r{toxinidir}/vmware_nsx/neutron/tests/functional/requirements.txt
-r{toxinidir}/vmware_nsx/tests/functional/requirements.txt
[testenv:dsvm-functional]
setenv = OS_SUDO_TESTING=1

View File

@ -27,7 +27,7 @@ from vmware_nsx.neutron.plugins.vmware.api_client import (
eventlet_client as client)
from vmware_nsx.neutron.plugins.vmware.api_client import (
eventlet_request as request)
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.tests.unit import vmware
LOG = logging.getLogger(__name__)
@ -108,8 +108,8 @@ class ApiRequestEventletTest(base.BaseTestCase):
def test_run_and_timeout(self):
def my_handle_request():
LOG.info('my_handle_request() self: %s' % self.req)
LOG.info('my_handle_request() dir(self): %s' % dir(self.req))
LOG.info(_LI('my_handle_request() self: %s'), self.req)
LOG.info(_LI('my_handle_request() dir(self): %s'), dir(self.req))
eventlet.greenthread.sleep(REQUEST_TIMEOUT * 2)
with mock.patch.object(
@ -331,5 +331,5 @@ class ApiRequestEventletTest(base.BaseTestCase):
{ "role": "api_provider",
"listen_addr": "pssl:1.1.1.1:1" }]}]}"""
r.successful = mock.Mock(return_value=True)
LOG.info('%s' % r.api_providers())
LOG.info(_LI('%s'), r.api_providers())
self.assertIsNotNone(r.api_providers())

View File

@ -16,7 +16,7 @@
from neutron.extensions import allowedaddresspairs as addr_pair
from neutron.tests.unit.db import test_allowedaddresspairs_db as ext_pairs
from vmware_nsx.neutron.tests.unit.vmware import test_nsx_plugin
from vmware_nsx.tests.unit.vmware import test_nsx_plugin
class TestAllowedAddressPairs(test_nsx_plugin.NsxPluginV2TestCase,

View File

@ -23,9 +23,9 @@ import six
from vmware_nsx.neutron.plugins.vmware.api_client import version
from vmware_nsx.neutron.plugins.vmware.common import sync
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware.apiclient import fake
from vmware_nsx.neutron.tests.unit.vmware import test_utils
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware.apiclient import fake
from vmware_nsx.tests.unit.vmware import test_utils
class MacLearningExtensionManager(object):

View File

@ -38,8 +38,8 @@ from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models
from vmware_nsx.neutron.plugins.vmware.extensions import networkgw
from vmware_nsx.neutron.plugins.vmware import nsxlib
from vmware_nsx.neutron.plugins.vmware.nsxlib import l2gateway as l2gwlib
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware import test_nsx_plugin
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware import test_nsx_plugin
_uuid = test_base._uuid
_get_path = test_base._get_path

View File

@ -17,9 +17,9 @@ import mock
from neutron.tests.unit.extensions import test_portsecurity as psec
from vmware_nsx.neutron.plugins.vmware.common import sync
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware.apiclient import fake
from vmware_nsx.neutron.tests.unit.vmware import test_utils
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware.apiclient import fake
from vmware_nsx.tests.unit.vmware import test_utils
class PortSecurityTestCase(psec.PortSecurityDBTestCase):

View File

@ -18,8 +18,8 @@ import webob.exc
from neutron.extensions import multiprovidernet as mpnet
from neutron.extensions import providernet as pnet
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware import test_nsx_plugin
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware import test_nsx_plugin
class TestProvidernet(test_nsx_plugin.NsxPluginV2TestCase):

View File

@ -24,8 +24,8 @@ from neutron.tests.unit.api import test_extensions
from vmware_nsx.neutron.plugins.vmware.dbexts import qos_db
from vmware_nsx.neutron.plugins.vmware.extensions import qos as ext_qos
from vmware_nsx.neutron.plugins.vmware import nsxlib
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware import test_nsx_plugin
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware import test_nsx_plugin
class QoSTestExtensionManager(object):

View File

@ -24,10 +24,10 @@ from neutron import manager
from neutron.tests.unit.db import test_db_base_plugin_v2 as test_db_plugin
from vmware_nsx.neutron.plugins.vmware.dbexts import vnic_index_db
from vmware_nsx.neutron.plugins.vmware.extensions import vnicindex as vnicidx
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.tests.unit import vmware
DB_PLUGIN_KLASS = ('vmware_nsx.neutron.tests.unit.vmware.extensions.'
DB_PLUGIN_KLASS = ('vmware_nsx.tests.unit.vmware.extensions.'
'test_vnic_index.VnicIndexTestPlugin')
_uuid = uuidutils.generate_uuid

View File

@ -23,8 +23,8 @@ from vmware_nsx.neutron.plugins.vmware.api_client import exception
from vmware_nsx.neutron.plugins.vmware.api_client import version
from vmware_nsx.neutron.plugins.vmware.common import config # noqa
from vmware_nsx.neutron.plugins.vmware import nsx_cluster as cluster
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware.apiclient import fake
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware.apiclient import fake
_uuid = test_base._uuid

View File

@ -24,7 +24,7 @@ from vmware_nsx.neutron.plugins.vmware.common import utils as nsx_utils
from vmware_nsx.neutron.plugins.vmware import nsxlib
from vmware_nsx.neutron.plugins.vmware.nsxlib import l2gateway as l2gwlib
from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switchlib
from vmware_nsx.neutron.tests.unit.vmware.nsxlib import base
from vmware_nsx.tests.unit.vmware.nsxlib import base
_uuid = test_base._uuid

View File

@ -20,7 +20,7 @@ from neutron.common import exceptions
from vmware_nsx.neutron.plugins.vmware.api_client import exception as api_exc
from vmware_nsx.neutron.plugins.vmware import nsxlib
from vmware_nsx.neutron.plugins.vmware.nsxlib import queue as queuelib
from vmware_nsx.neutron.tests.unit.vmware.nsxlib import base
from vmware_nsx.tests.unit.vmware.nsxlib import base
class TestLogicalQueueLib(base.NsxlibTestCase):

View File

@ -27,7 +27,7 @@ from vmware_nsx.neutron.plugins.vmware.common import utils
from vmware_nsx.neutron.plugins.vmware import nsxlib
from vmware_nsx.neutron.plugins.vmware.nsxlib import router as routerlib
from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switchlib
from vmware_nsx.neutron.tests.unit.vmware.nsxlib import base
from vmware_nsx.tests.unit.vmware.nsxlib import base
_uuid = test_base._uuid

View File

@ -20,7 +20,7 @@ from neutron.tests.unit.api.v2 import test_base
from vmware_nsx.neutron.plugins.vmware import nsxlib
from vmware_nsx.neutron.plugins.vmware.nsxlib import secgroup as secgrouplib
from vmware_nsx.neutron.tests.unit.vmware.nsxlib import base
from vmware_nsx.tests.unit.vmware.nsxlib import base
_uuid = test_base._uuid

View File

@ -23,7 +23,7 @@ from neutron.tests.unit.api.v2 import test_base
from vmware_nsx.neutron.plugins.vmware.common import utils
from vmware_nsx.neutron.plugins.vmware.nsxlib import switch as switchlib
from vmware_nsx.neutron.tests.unit.vmware.nsxlib import base
from vmware_nsx.tests.unit.vmware.nsxlib import base
_uuid = test_base._uuid

View File

@ -19,8 +19,8 @@ import mock
from oslo_log import log
from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib
from vmware_nsx.neutron.tests.unit.vmware.nsxlib.v3 import nsxlib_testcase
from vmware_nsx.neutron.tests.unit.vmware import test_constants_v3
from vmware_nsx.tests.unit.vmware.nsxlib.v3 import nsxlib_testcase
from vmware_nsx.tests.unit.vmware import test_constants_v3
LOG = log.getLogger(__name__)

View File

@ -19,8 +19,8 @@ import mock
from oslo_log import log
from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib
from vmware_nsx.neutron.tests.unit.vmware.nsxlib.v3 import nsxlib_testcase
from vmware_nsx.neutron.tests.unit.vmware import test_constants_v3
from vmware_nsx.tests.unit.vmware.nsxlib.v3 import nsxlib_testcase
from vmware_nsx.tests.unit.vmware import test_constants_v3
LOG = log.getLogger(__name__)

View File

@ -21,8 +21,8 @@ from oslo_utils import uuidutils
from vmware_nsx.neutron.plugins.vmware.common import nsx_constants
from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib
from vmware_nsx.neutron.tests.unit.vmware import nsx_v3_mocks
from vmware_nsx.neutron.tests.unit.vmware.nsxlib.v3 import nsxlib_testcase
from vmware_nsx.tests.unit.vmware import nsx_v3_mocks
from vmware_nsx.tests.unit.vmware.nsxlib.v3 import nsxlib_testcase
LOG = log.getLogger(__name__)

View File

@ -21,9 +21,9 @@ from neutron.tests.unit.db import test_agentschedulers_db # noqa
from vmware_nsx.neutron.plugins.vmware.common import sync
from vmware_nsx.neutron.plugins.vmware.dhcp_meta import rpc
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware.apiclient import fake
from vmware_nsx.neutron.tests.unit.vmware import test_utils
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware.apiclient import fake
from vmware_nsx.tests.unit.vmware import test_utils
class DhcpAgentNotifierTestCase(

View File

@ -29,7 +29,7 @@ from vmware_nsx.neutron.plugins.vmware.common import exceptions
from vmware_nsx.neutron.plugins.vmware.common import sync
from vmware_nsx.neutron.plugins.vmware import nsx_cluster
from vmware_nsx.neutron.plugins.vmware.nsxlib import lsn as lsnlib
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.tests.unit import vmware
BASE_CONF_PATH = vmware.get_fake_conf('neutron.conf.test')
NSX_INI_PATH = vmware.get_fake_conf('nsx.ini.basic.test')

View File

@ -16,7 +16,7 @@
from neutron.extensions import portbindings as pbin
from vmware_nsx.neutron.tests.unit.vmware import test_nsx_v3_plugin
from vmware_nsx.tests.unit.vmware import test_nsx_v3_plugin
class TestParentTagPortBinding(test_nsx_v3_plugin.NsxPluginV3TestCase):

View File

@ -51,9 +51,9 @@ from vmware_nsx.neutron.plugins.vmware.common import sync
from vmware_nsx.neutron.plugins.vmware.common import utils
from vmware_nsx.neutron.plugins.vmware.dbexts import db as nsx_db
from vmware_nsx.neutron.plugins.vmware import nsxlib
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware.apiclient import fake
from vmware_nsx.neutron.tests.unit.vmware import test_utils
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware.apiclient import fake
from vmware_nsx.tests.unit.vmware import test_utils
LOG = log.getLogger(__name__)

View File

@ -39,8 +39,8 @@ from vmware_nsx.neutron.plugins.vmware.dbexts import db
from vmware_nsx.neutron.plugins.vmware import nsx_cluster as cluster
from vmware_nsx.neutron.plugins.vmware import nsxlib
from vmware_nsx.neutron.plugins.vmware import plugin
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware.apiclient import fake
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware.apiclient import fake
LOG = log.getLogger(__name__)

View File

@ -26,8 +26,8 @@ from vmware_nsx.neutron.plugins.vmware.common import nsx_utils
from vmware_nsx.neutron.plugins.vmware.common import utils
from vmware_nsx.neutron.plugins.vmware.dbexts import nsx_models
from vmware_nsx.neutron.plugins.vmware import nsxlib
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware.nsxlib import base as nsx_base
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware.nsxlib import base as nsx_base
class NsxUtilsTestCase(base.BaseTestCase):

View File

@ -36,8 +36,8 @@ from neutron import version
from vmware_nsx.neutron.plugins.vmware.common import utils
from vmware_nsx.neutron.plugins.vmware.nsxlib import v3 as nsxlib
from vmware_nsx.neutron.plugins.vmware.nsxlib.v3 import dfw_api as firewall
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware import nsx_v3_mocks
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware import nsx_v3_mocks
PLUGIN_NAME = ('vmware_nsx.neutron.plugins.vmware.'
'plugins.nsx_v3_plugin.NsxV3Plugin')

View File

@ -54,10 +54,10 @@ from vmware_nsx.neutron.plugins.vmware.extensions import (
from vmware_nsx.neutron.plugins.vmware.vshield.common import (
constants as vcns_const)
from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware.extensions import test_vnic_index
from vmware_nsx.neutron.tests.unit.vmware import test_utils
from vmware_nsx.neutron.tests.unit.vmware.vshield import fake_vcns
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware.extensions import test_vnic_index
from vmware_nsx.tests.unit.vmware import test_utils
from vmware_nsx.tests.unit.vmware.vshield import fake_vcns
PLUGIN_NAME = 'vmware_nsx.neutron.plugins.vmware.plugin.NsxVPlugin'

View File

@ -27,7 +27,7 @@ from vmware_nsx.neutron.plugins.vmware.dbexts import nsxv_db
from vmware_nsx.neutron.plugins.vmware.vshield.common import (
constants as vcns_const)
from vmware_nsx.neutron.plugins.vmware.vshield import edge_utils
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.tests.unit import vmware
_uuid = uuidutils.generate_uuid

View File

@ -25,8 +25,8 @@ from vmware_nsx.neutron.plugins.vmware.vshield.tasks import (
constants as ts_const)
from vmware_nsx.neutron.plugins.vmware.vshield.tasks import tasks as ts
from vmware_nsx.neutron.plugins.vmware.vshield import vcns_driver
from vmware_nsx.neutron.tests.unit import vmware
from vmware_nsx.neutron.tests.unit.vmware.vshield import fake_vcns
from vmware_nsx.tests.unit import vmware
from vmware_nsx.tests.unit.vmware.vshield import fake_vcns
VCNS_CONFIG_FILE = vmware.get_fake_conf("vcns.ini.test")