Merge "Add common base class for test cases"
This commit is contained in:
@@ -17,10 +17,10 @@ from tempest.common import utils
|
|||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
from testtools import testcase as testtools
|
from testtools import testcase as testtools
|
||||||
|
|
||||||
from trove_tempest_plugin.tests.api import base
|
from trove_tempest_plugin.tests import base_test
|
||||||
|
|
||||||
|
|
||||||
class DatabaseFlavorsTest(base.BaseDatabaseTest):
|
class DatabaseFlavorsTest(base_test.BaseDatabaseTest):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_clients(cls):
|
def setup_clients(cls):
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ from tempest.lib import decorators
|
|||||||
from tempest.lib import exceptions as lib_exc
|
from tempest.lib import exceptions as lib_exc
|
||||||
from testtools import testcase as testtools
|
from testtools import testcase as testtools
|
||||||
|
|
||||||
from trove_tempest_plugin.tests.api import base
|
from trove_tempest_plugin.tests import base_test
|
||||||
|
|
||||||
|
|
||||||
class DatabaseFlavorsNegativeTest(base.BaseDatabaseTest):
|
class DatabaseFlavorsNegativeTest(base_test.BaseDatabaseTest):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_clients(cls):
|
def setup_clients(cls):
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
from testtools import testcase as testtools
|
from testtools import testcase as testtools
|
||||||
|
|
||||||
from trove_tempest_plugin.tests.api import base
|
from trove_tempest_plugin.tests import base_test
|
||||||
|
|
||||||
|
|
||||||
class DatabaseLimitsTest(base.BaseDatabaseTest):
|
class DatabaseLimitsTest(base_test.BaseDatabaseTest):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup(cls):
|
def resource_setup(cls):
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
from tempest.lib import decorators
|
from tempest.lib import decorators
|
||||||
from testtools import testcase as testtools
|
from testtools import testcase as testtools
|
||||||
|
|
||||||
from trove_tempest_plugin.tests.api import base
|
from trove_tempest_plugin.tests import base_test
|
||||||
|
|
||||||
|
|
||||||
class DatabaseVersionsTest(base.BaseDatabaseTest):
|
class DatabaseVersionsTest(base_test.BaseDatabaseTest):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setup_clients(cls):
|
def setup_clients(cls):
|
||||||
|
|||||||
@@ -14,15 +14,20 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from tempest import config
|
from tempest import config
|
||||||
import tempest.test
|
from tempest import test
|
||||||
|
|
||||||
from trove_tempest_plugin import clients
|
from trove_tempest_plugin import clients
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class BaseDatabaseTest(tempest.test.BaseTestCase):
|
class BaseDatabaseTest(test.BaseTestCase):
|
||||||
"""Base test case class for all Database API tests."""
|
"""Base test case class.
|
||||||
|
|
||||||
|
Includes parts common to API and scenario tests:
|
||||||
|
* test case callbacks,
|
||||||
|
* service clients initialization.
|
||||||
|
"""
|
||||||
|
|
||||||
credentials = ['primary']
|
credentials = ['primary']
|
||||||
client_manager = clients.Manager
|
client_manager = clients.Manager
|
||||||
@@ -76,7 +81,6 @@ class BaseDatabaseTest(tempest.test.BaseTestCase):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def resource_setup(cls):
|
def resource_setup(cls):
|
||||||
super(BaseDatabaseTest, cls).resource_setup()
|
super(BaseDatabaseTest, cls).resource_setup()
|
||||||
|
|
||||||
cls.catalog_type = CONF.database.catalog_type
|
cls.catalog_type = CONF.database.catalog_type
|
||||||
cls.db_flavor_ref = CONF.database.db_flavor_ref
|
cls.db_flavor_ref = CONF.database.db_flavor_ref
|
||||||
cls.db_current_version = CONF.database.db_current_version
|
cls.db_current_version = CONF.database.db_current_version
|
||||||
Reference in New Issue
Block a user