Make(file) juju tests and unit test easier to discover?
Marco Ceppi
marco.ceppi at canonical.com
Fri Nov 8 23:26:42 UTC 2013
Hi all,
I've been toying with this idea for the past few days after seeing a
Makefile in a charm. As we move closer to starting the audit on the charms
in the charm store I'm trying to figure out best practices for the
juju-test plugin to be able to run not only the integration tests but also
unit tests that are starting to appear in more and more charms (LOVE THIS!)
Originally, I figured unit tests would be included as a test file in the
tests directory, eg:
```tests/01-unit-test
#!/bin/bash
set -eux
sudo apt-get install python-nose
CHARM_DIR=$(pwd) PYTHONPATH=$(pwd)/hooks nosetests -s $(pwd)/hooks/tests
```
That way you could run the entire test suite, via `juju test`, or just the
unit test with `juju test 01-unit-test`. However, I've noticed a lot more
charms with Makefiles. I'd like to know if maybe utilizing existing
conventions would be better. In this case `make test` would preform Unit
Tests, if any, and `make functional` could run the juju-test functional
tests.
Thoughts on this? What should we recommend as a best practice - or even a
policy? At the end of the day we'll need to know in order to make sure the
charm testing infrastructure knows what to utilize.
Thanks,
Marco Ceppi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20131108/0f202cf3/attachment.html>
More information about the Juju
mailing list