[test] Python-Django test plan
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | python-django (Juju Charms Collection) |
Undecided
|
nicopace | ||
Bug Description
I plan to improve this charm by adding this tests:
* improve basic test by checking if the service is running ok (accessing a public url, and an authenticated url)
* test deploying using a site template
* test deployment with gunicorn
* test using code repository
* test dpaste configuration example, from README
* test "upgrade charm"
* test fabric commands
* test application subordinate charm
* test django_version, for different options like ppa, pip like or url
* test unit-config, as it is not clear what it is for
* test urls_dir_name and urls_injection_
* test different databases relations
* test memcached
* test settings injection
| Sheila Miguez (codersquid) wrote : | #1 |
| nicopace (nicopace) wrote : | #2 |
@codersquid Good idea, testing settings injection. i'll add it to the plan.
I didn't know that fabric was going to get dropped. Where is it documented?
I don't know what a mojo spec is... can you clarify, or give me some link about that?
| description: | updated |
| Sheila Miguez (codersquid) wrote : | #3 |
@nicopace Mojo got announced very recently, and I've been using it with the python-django charm for deploying things. I'll put together a generic python-django charm as an example when I have a chance. Mine has a few specific things that aren't relevant.
https:/
| nicopace (nicopace) wrote : | #4 |
@codersquid for what i undertand, Mojo is a declarative way of defining scenaries and testing them, while Amulet is a library to do this programmatically.
I believe that the way to go for now is using Amulet, as it is the de-facto way of testing.
| Patrick Hetu (patrick-hetu) wrote : | #5 |
nicopace that would be an awesome start!
If you want to test dpaste you will need a subordinate for static files like https:/
You could also use something like dj-static or a CDN subordinate like django-cumulus but it's harder to do.
It still think that fabric is still a valid way to interact with the web site.
I would leave the upgrade test since it is not cleat yet what upgrade should do now.

I recommend adding tests for settings injection.
Do you need to test fabric or will it get dropped when the ansible work is done?
I have a branch of this charm where I have added nagios checks and I have a mojo spec with a verify phase that runs http_check which does nicely for your first item in the list.