[openstack-dev] [infra] Unit tests, gating, and real databases

Roman Podoliaka rpodolyaka at mirantis.com
Wed Jan 8 10:00:12 UTC 2014


Hi Ivan,

Indeed, nodepool nodes have MySQL and PostgreSQL installed and
running. There are databases you can access from your tests
(mysql://openstack_citest:openstack_citest@localhost/openstack_citest
and postgresql://openstack_citest:openstack_citest@localhost/openstack_citest).
[1] is a great example how it's actually used for running
backend-specific DB test cases in oslo-incubator.

Besides, openstack_citest user in PostgreSQL is allowed to create/drop
databases, which enables us to implement a slightly different approach
of running DB tests [2]. This might be very useful when you need more
that one DB schema (e.g. to run tests concurrently).

Thanks,
Roman

[1] https://review.openstack.org/#/c/54375/
[2] https://review.openstack.org/#/c/47818/

On Fri, Jan 3, 2014 at 9:17 PM, Ivan Melnikov
<imelnikov at griddynamics.com> wrote:
> Hi there,
>
> As far as I understand, slaves that run gate-*-python27 and python26
> jobs have MySQL and Postgres servers installed and running so we can
> test migrations and do functional testing for database-related code.
> I wanted to use this to improve TaskFlow gating, but I failed to find
> docs about it and to derive how this database instances should be
> used from nova and oslo.db tests code.
>
> Can anyone give some hints or pointers on where should I get
> connection config and what can I do with those database servers in
> unit and functional tests?
>
> --
> WBR,
> Ivan A. Melnikov
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list