All functional tests logs results now

Some functional tests clases didn't inherit from
neutron.tests.functional.base.BaseLoggingTestCase class
and because of that there was no logs from such tests
in DEFAULT_LOG_DIR.

This patch changes it and logs should be available for all
functional tests.

TrivialFix

Change-Id: Ia71390afe9c8191179c626375ed683f242d35b3e
This commit is contained in:
Slawek Kaplonski 2018-11-21 15:49:25 +01:00
parent 7d6057739b
commit 4ad302af87
12 changed files with 26 additions and 25 deletions

View File

@ -19,10 +19,10 @@ from neutron._i18n import _
from neutron.agent.common import async_process
from neutron.agent.linux import utils
from neutron.common import utils as common_utils
from neutron.tests import base
from neutron.tests.functional import base
class AsyncProcessTestFramework(base.BaseTestCase):
class AsyncProcessTestFramework(base.BaseLoggingTestCase):
def setUp(self):
super(AsyncProcessTestFramework, self).setUp()

View File

@ -19,15 +19,15 @@ from six import moves
from neutron.agent.linux import external_process
from neutron.common import utils
from neutron.tests import base
from neutron.tests.functional.agent.linux import simple_daemon
from neutron.tests.functional import base
UUID_FORMAT = "test-uuid-%d"
SERVICE_NAME = "service"
class BaseTestProcessMonitor(base.BaseTestCase):
class BaseTestProcessMonitor(base.BaseLoggingTestCase):
def setUp(self):
super(BaseTestProcessMonitor, self).setUp()

View File

@ -14,14 +14,14 @@
# under the License.
from neutron.agent.windows import ip_lib
from neutron.tests import base
from neutron.tests.functional import base
WRONG_IP = '0.0.0.0'
TEST_IP = '127.0.0.1'
TEST_MAC = '00:00:00:00:00:00'
class IpLibTestCase(base.BaseTestCase):
class IpLibTestCase(base.BaseLoggingTestCase):
def test_ipwrapper_get_device_by_ip_None(self):
self.assertIsNone(ip_lib.IPWrapper().get_device_by_ip(WRONG_IP))

View File

@ -21,12 +21,12 @@ from neutron_lib import fixture
from neutron.api import extensions
from neutron import policy
from neutron.tests import base
from neutron.tests.functional import base
TEST_PATH = os.path.dirname(os.path.abspath(__file__))
class APIPolicyTestCase(base.BaseTestCase):
class APIPolicyTestCase(base.BaseLoggingTestCase):
"""Base class for API policy tests
Tests for REST API policy checks. Ideally this would be done against an

View File

@ -13,10 +13,10 @@
from neutron.agent.linux import ipset_manager
from neutron.cmd import ipset_cleanup
from neutron.conf.agent import cmd
from neutron.tests import base
from neutron.tests.functional import base
class TestIPSetCLIConfig(base.BaseTestCase):
class TestIPSetCLIConfig(base.BaseLoggingTestCase):
def setup_config(self, args=None):
self.conf = ipset_cleanup.setup_conf()

View File

@ -13,10 +13,10 @@
import testtools
from neutron.common import utils
from neutron.tests import base
from neutron.tests.functional import base
class TestWaitUntilTrue(base.BaseTestCase):
class TestWaitUntilTrue(base.BaseLoggingTestCase):
def test_wait_until_true_predicate_succeeds(self):
utils.wait_until_true(lambda: True)

View File

@ -32,6 +32,7 @@ from neutron.db.migration.alembic_migrations import external
from neutron.db.migration import cli as migration
from neutron.db.migration.models import head as head_models
from neutron.tests import base as test_base
from neutron.tests.functional import base as functional_base
from neutron.tests.unit import testlib_api
cfg.CONF.import_opt('core_plugin', 'neutron.conf.common')
@ -348,7 +349,8 @@ class _TestModelsMigrations(test_migrations.ModelsMigrationsSync):
class TestModelsMigrationsMysql(testlib_api.MySQLTestCaseMixin,
_TestModelsMigrations,
testlib_api.SqlTestCaseLight):
testlib_api.SqlTestCaseLight,
functional_base.BaseLoggingTestCase):
def test_check_mysql_engine(self):
engine = self.get_engine()

View File

@ -15,10 +15,10 @@
import sqlalchemy
from neutron.tests import base
from neutron.tests.functional import base
class TestDBCreation(base.BaseTestCase):
class TestDBCreation(base.BaseLoggingTestCase):
"""Check database schema can be created without conflicts.
For each test case is created a SQLite memory database.

View File

@ -16,10 +16,10 @@ from oslo_utils import uuidutils
from neutron.agent.linux import ip_lib
from neutron.privileged.agent.linux import ip_lib as priv_ip_lib
from neutron.tests import base
from neutron.tests.functional import base
class GetDevicesTestCase(base.BaseTestCase):
class GetDevicesTestCase(base.BaseLoggingTestCase):
def _remove_ns(self, namespace):
priv_ip_lib.remove_netns(namespace)

View File

@ -14,11 +14,10 @@
# under the License.
from neutron.cmd.sanity import checks
from neutron.tests import base
from neutron.tests.functional import base as functional_base
from neutron.tests.functional import base
class SanityTestCase(base.BaseTestCase):
class SanityTestCase(base.BaseLoggingTestCase):
"""Sanity checks that do not require root access.
Tests that just call checks.some_function() are to ensure that
@ -42,7 +41,7 @@ class SanityTestCase(base.BaseTestCase):
checks.ip6tables_supported()
class SanityTestCaseRoot(functional_base.BaseSudoTestCase):
class SanityTestCaseRoot(base.BaseSudoTestCase):
"""Sanity checks that require root access.
Tests that just call checks.some_function() are to ensure that

View File

@ -28,7 +28,7 @@ import psutil
from neutron.common import utils
from neutron import manager
from neutron import service
from neutron.tests import base
from neutron.tests.functional import base
from neutron import wsgi
@ -41,7 +41,7 @@ FAKE_START_MSG = b"start"
TARGET_PLUGIN = 'neutron.plugins.ml2.plugin.Ml2Plugin'
class TestNeutronServer(base.BaseTestCase):
class TestNeutronServer(base.BaseLoggingTestCase):
def setUp(self):
super(TestNeutronServer, self).setUp()
self.service_pid = None

View File

@ -17,11 +17,11 @@ from oslo_config import cfg
from oslo_service import service
from neutron import service as neutron_service
from neutron.tests import base
from neutron.tests.functional import base
from neutron.tests.functional import test_server
class TestService(base.BaseTestCase):
class TestService(base.BaseLoggingTestCase):
def test_api_workers_default(self):
self.assertEqual(processutils.get_worker_count(),