← Back to team overview

openstack team mailing list archive

Re: Testing SSL?


On 3 Jan 2012, at 12:20, Joshua Harlow wrote:

> For a submission I am doing for kombu enabling SSL,
> the code changes are mainly passing config down through
> kombu but I was wondering if there is a method (smoke test),
> unit test (does that make sense?) for ensuring that SSL is
> actually working as suggested.

A unit test would make sense, e.g. for the amqplib transport
you could mock the kombu.transports.pyamqplib.Connection object
and just test that the correct values are being passed to it.

> For this kombu change would it make sense to test that the
> kombu library passes the SSL config all the way through
> or is this more of testing kombu (which openstack doesn't
> seem like it should be getting in the business of)?

> This seems like a similar question that could be asked
> for other SSL changes others are doing, are they adding
> tests (smoke or unit) that ensure SSL got turned on or
> are they relying on the underlying implementation (ie apache,
> rabbitmq, kombu...) and just making sure the correct config
> is passed to that implementation?

Pedantically speaking, if you tested the actual implementation
it wouldn't be a unit test.

It definitely belongs in Kombu as a unit test, 
Kombu also has a functional test suite in the funtests/
directory, which could test that SSL is actually enabled in RabbitMQ.

You could add it to your own test suites as well,
but then it may be easier to run Kombu's
test suite as part of your CI or integrational processes.

Ask Solem
Staff Engineer, RabbitMQ, VMware
twitter.com/asksol | +44 (0)7713357179

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail