[openstack-dev] [oslo] documentation on using the oslo.db opportunistic test feature
Mike Bayer
mbayer at redhat.com
Tue Feb 23 16:17:11 UTC 2016
On 02/22/2016 08:02 PM, Sean Dague wrote:
> Before migrating into oslo.db the opportunistic testing for database
> backends was pretty simple. Create an openstack_citest at openstack_citest
> pw:openstack_citest and you could get tests running on mysql. This no
> longer seems to be the case.
this is still the case. The provisioning system hardcodes this URL as
the default and no changes were needed to any classes using the existing
MySQLOpportunisticTestCase base.
Nova has plenty of test cases that use this and I run these tests
against MySQL on my own CI daily:
grep -hC3 "MySQLOpportunistic" `find nova/tests -name "*.py"`
class TestMySQLSqlalchemyTypesRepr(TestSqlalchemyTypesRepr,
test_base.MySQLOpportunisticTestCase):
pass
--
class TestMigrationUtilsMySQL(TestMigrationUtilsSQLite,
test_base.MySQLOpportunisticTestCase):
pass
--
class TestNovaMigrationsMySQL(NovaMigrationsCheckers,
test_base.MySQLOpportunisticTestCase,
test.NoDBTestCase):
def test_innodb_tables(self):
with mock.patch.object(sa_migration, 'get_engine',
--
class TestNovaAPIMigrationsMySQL(NovaAPIModelsSync,
test_base.MySQLOpportunisticTestCase,
test.NoDBTestCase):
pass
--
class TestNovaAPIMigrationsWalkMySQL(NovaAPIMigrationsWalk,
test_base.MySQLOpportunisticTestCase,
test.NoDBTestCase):
pass
>
> I went digging through the source code a bit and it's not entirely
> evident what the new required setup is. Can someone point me to the docs
> to use this? Or explain what the setup for local testing is now? We've
> got some bugs which expose on mysql and not sqlite in nova that we'd
> like to get some test cases written for.
>
> -Sean
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
More information about the OpenStack-dev
mailing list