[openstack-dev] [Metering][Ceilometer] Newbie question - running tests in dev env ...

Doug Hellmann doug.hellmann at dreamhost.com
Thu Jan 17 20:47:13 UTC 2013


On Thu, Jan 17, 2013 at 2:15 PM, Sandy Walsh <sandy.walsh at rackspace.com>wrote:

> Hey y'all,
>
> Sorry for the post, but the IRC channel was dead.
>
> I'm trying to set up a dev env for CM (sans devstack) and trying to get
> the tests running but they're blowing up for me left and right ... are they
> meant to run clean currently or is this a known issue? Are there any docs
> for getting a CM dev environment set up?
>

It looks like an upstream package that we depend on did a code reorg and
since we're pointing at tip that broke us. I've got a code review to fix it
up now at https://review.openstack.org/#/c/19969/

That issue is only related to a few of the API tests, though, so if you're
seeing other failures post a traceback or two and I'll see if I can offer
any suggestions.


>
> There seems to be assumptions in there of a functioning mongodb and kvm
> ... are these not faked out for tests? Do I need to have a running mongo
> and kvm on my dev env (even if I'm not using these drivers)?
>

Although it is possible to test against a live mongo instance, the tests
should default to using MIM (an in-memory version of Mongo created for
tests). The tox configuration should set that up for you.

For kvm, you at least need libvirt installed. I'm pretty sure we have all
of the tests mocking out the actual calls, though.


>
> And what's the difference between ./ceilometer/ceilometer/tests/* and
> ./ceilometer/tests/*
>

The code in ceilometer.tests is support code for the actual tests. Because
of the nose configuration, it's easier to import it from there in the tests
that need it.

Doug


>
> Any pointers would be great.
>
> Thanks,
> Sandy
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130117/9a8eec50/attachment.html>


More information about the OpenStack-dev mailing list