refactor: Rename TestSuite to TestBase

Also updates bin/marconi-self-host to use Bootstrap, not Kernel.
Also fixes rebase issues

Change-Id: Ie68f6f9765bb4763fba031a709483301f98fa72c
Trello: #102
This commit is contained in:
kgriffs 2013-03-19 14:35:06 -04:00
parent 258c492eca
commit d7a97a5d6a
10 changed files with 20 additions and 19 deletions

View File

@ -18,12 +18,12 @@
"""Bootstrap for self-hosting a Marconi node
Alternatively, to host a WSGI app with an external server, configure
kernel with the WSGI transport and export the WSGI app callable, e.g.:
bootstrap with the WSGI transport and export the WSGI app callable, e.g.:
logging.config.fileConfig(logging_conf_file)
kernel = Kernel(conf_file)
boot = Bootstrap(conf_file)
app = kernel.transport.app
app = boot.transport.app
"""

View File

@ -15,7 +15,7 @@
# Import guard. No module level import during the setup procedure.
try:
__MARCONI_SETUP__
__MARCONI_SETUP__ # NOQA
except NameError:
import gettext
gettext.install("marconi", unicode=1)

View File

@ -15,10 +15,10 @@
from marconi import storage
from marconi.tests.util import suite
from marconi.tests import util as testing
class ControllerBaseTest(suite.TestSuite):
class ControllerBaseTest(testing.TestBase):
tenant = "tenant"
driver_class = None
controller_class = None

View File

@ -15,7 +15,7 @@
from marconi import storage
from marconi.tests.util import suite
from marconi.tests import util as testing
class Driver(storage.DriverBase):
@ -56,7 +56,7 @@ class QueueController(storage.QueueBase):
marker=marker, limit=limit)
class TestQueueBase(suite.TestSuite):
class TestQueueBase(testing.TestBase):
def setUp(self):
super(TestQueueBase, self).setUp()

View File

@ -19,13 +19,13 @@ from marconi.common import config
from marconi.storage import mongodb
from marconi.storage.mongodb import controllers
from marconi.tests.storage import base
from marconi.tests.util import suite
from marconi.tests import util as testing
cfg = config.namespace("drivers:storage:mongodb").from_options()
class MongodbDriverTest(suite.TestSuite):
class MongodbDriverTest(testing.TestBase):
def setUp(self):
if not os.environ.get("MONGODB_TEST_LIVE"):

View File

@ -16,7 +16,7 @@
import testtools
from marconi.common import config
from marconi.tests.util import suite
from marconi.tests import util as testing
cfg_handle = config.project()
@ -25,7 +25,7 @@ cfg = cfg_handle.from_options(
with_help=(None, "nonsense"))
class TestConfig(suite.TestSuite):
class TestConfig(testing.TestBase):
def test_cli(self):
args = ['--with_help', 'sense']

View File

@ -13,15 +13,15 @@
# under the License.
import marconi
from marconi.tests.util import suite
from marconi.tests import util as testing
class TestSimple(suite.TestSuite):
class TestSimple(testing.TestBase):
def test_simple(self):
"""Doesn't really test much."""
conf_file = self.conf_path('wsgi_reference.conf')
boot = marconi.Bootstrap(conf_file)
transport = boot.transport
wsgi_app = transport.app
wsgi_app = transport.app # NOQA
self.assertTrue(True)

View File

@ -17,10 +17,10 @@ import testtools
from marconi.storage import exceptions
from marconi.storage import sqlite
from marconi.tests.util import suite
from marconi.tests import util as testing
class TestSqlite(suite.TestSuite):
class TestSqlite(testing.TestBase):
def test_sqlite(self):
storage = sqlite.Driver()

View File

@ -1 +1,3 @@
"""Test utilities"""
from marconi.tests.util.base import TestBase # NOQA

View File

@ -16,14 +16,13 @@
import os
import testtools
from marconi.common import config
cfg = config.project()
class TestSuite(testtools.TestCase):
class TestBase(testtools.TestCase):
"""
Child class of testtools.TestCase for testing Marconi