[openstack-dev] [Keystone] Need help writing gate tests

Clark Boylan clark.boylan at gmail.com
Thu Jul 11 03:01:02 UTC 2013


On Wed, Jul 10, 2013 at 7:32 PM, Adam Young <ayoung at redhat.com> wrote:
> I want to write 3 new Jenkins gate tests:   Run the Keystone unit tests
> against
>
> 1. A live LDAP server
> 2. MySQL
> 3. Postgresql
>
> Right now, we know that the unit tests will fail against the live DBs, so we
> want those two to be non-voting.  The Live LDAP one should be the scheme as
> set up by devstack, and should be voting (can be non-voting to start)
>
> where do I start?  Do I need to do this in
> https://github.com/openstack-infra/config or
> http://ci.openstack.org/devstack-gate.html?
>
Adding a Jenkins job typically involves two pieces of config in
openstack-infra/config. First you need to add the job to the Jenkins
Job Builder config so that the job gets into Jenkins. This is done in
the files under
modules/openstack_project/files/jenkins_job_builder/config. There are
tons of examples in there and documentation can be found at
http://ci.openstack.org/jjb.html. The other config that is needed is
an update to the zuul layout.yaml file telling zuul when to run the
jobs. The layout file is at
modules/openstack_project/files/zuul/layout.yaml and documentation for
that can be found at http://ci.openstack.org/zuul.html.

Our CentOS 6 and Ubuntu Precise slaves (used to run python 2.6 and 2.7
unittests) have MySQL and PostgreSQL servers running on them and are
available to the unittests. You can see how Nova makes use of these
servers at https://github.com/openstack/nova/blob/master/nova/tests/db/test_migrations.py#L31.
I prefer having opportunistic tests like Nova because it keeps the
number of special tests in our system down. If this isn't possible
because the tests don't currently pass you will probably want to add a
new test that runs something like `tox -evenv -- #command to run tests
against real DBs`.

Our CentOS 6 and Ubuntu Precise slaves do not currently have LDAP
servers running on them but we would be happy to add them. I don't
think disposable devstack slaves are necessary to do LDAP testing as
your LDAP tests should be able to assert a clean LDAP state before
testing. If that isn't possible (I could be completely wrong about my
previous statement) you will want to look at the
gate-pbr-devstack-vm-rawinstall in the Jenkins Job Builder config as
it will show you how to use a devstack node for something other than
running tempest.

Clark



More information about the OpenStack-dev mailing list