[openstack-dev] [Keystone] Need help writing gate tests
Sean Dague
sean at dague.net
Thu Jul 11 10:30:28 UTC 2013
On 07/10/2013 11:01 PM, Clark Boylan wrote:
> 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`.
It's not just nova.... cinder, glance, and ironic all do the same thing.
Chris Yeoh actually tried to get the same thing into keystone in both G3
and H1, but it was blocked by the keystone team.
I'd really look at trying to do what nova/cinder/glance/ironic all
already do here. If it has to land through oslo first, that's a thing to
do, however nova's been gating on mysql in unit tests since early in
Grizzly, so it's been proved out pretty well.
-Sean
--
Sean Dague
http://dague.net
More information about the OpenStack-dev
mailing list