Merge lp:~vila/ubuntu-ci-services-itself/ppa-assigner-integration-test into lp:ubuntu-ci-services-itself
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | 49 |
Merged at revision: | 51 |
Proposed branch: | lp:~vila/ubuntu-ci-services-itself/ppa-assigner-integration-test |
Merge into: | lp:ubuntu-ci-services-itself |
Diff against target: |
210 lines (+174/-2) 4 files modified
README (+55/-0) TRICKS (+66/-0) juju-deployer/ppa-assigner.yaml (+5/-2) tests/ppa_assigner/test.py (+48/-0) |
To merge this branch: | bzr merge lp:~vila/ubuntu-ci-services-itself/ppa-assigner-integration-test |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Para Siva (community) | Approve | ||
Review via email: mp+199513@code.launchpad.net |
Commit message
First integration tests for ppa assigner using amulet and juju deployer.
Description of the change
Here is a first succesful attempt at running an integration test using juju
deployer and amulet.
Andy's ppa-assigner juju deployer script was chosen for that, sorry Andy ;)
Or rather, thanks Andy !
With the help of Martin we diagnosed hundreds^W a bunch of various issues
that we tried to capture but... long story short, we had to take a few
shortcuts ;)
Still, any of us should be able to reproduce the experience following the
instructions in the README.
To summarize:
- cloud credentials are assumed to be available, so source your novarc first.
- sshuttle needs to be setup manually each time you run 'juju bootstrap'
- you need to install amulet from lp:~vila/amulet/ci and setup your env
appropriately (my PYTHONPATH includes ~/lib/python so I create a symlink
there to the amulet sources)
From that point, the test run is automatic and can be re-run at will.
It will deploy the ppa-assigner or reuse the one you deploy before running
the test.
A single test has been created for now and the next step will be to turn it
into a regular python unittest one but we wanted to share that first
significant step.
That test issue a request to get the list of the ppas. The request succeeds
(200, OK) but the objects in the content is empty. I don't know if that's
because we've mis-configured something or a genuine bug, please advise !
But more importantly, try this at home and tell us what works and what
doesn't so we can find the Right Way to automate this further.
On 18 December 2013 17:51, Vincent Ladeuil <email address hidden> wrote: ppa_assigner/ test.py' assigner/ test.py 1970-01-01 00:00:00 +0000 assigner/ test.py 2013-12-18 17:42:04 +0000 opd((os. path.abspath( __file_ _)))))
> === added file 'tests/
> --- tests/ppa_
> +++ tests/ppa_
> +opd = os.path.dirname
> +
> +root_dir = opd(opd(
Surely:
os.path. abspath( os.path. join ('../../../', __file__))