Merge lp:~benji/lpsetup/bug-1020734-first-integration-test into lp:lpsetup
Proposed by
Benji York
Status: | Merged |
---|---|
Approved by: | Benji York |
Approved revision: | 53 |
Merged at revision: | 48 |
Proposed branch: | lp:~benji/lpsetup/bug-1020734-first-integration-test |
Merge into: | lp:lpsetup |
Diff against target: |
200 lines (+126/-7) 6 files modified
README.rst (+13/-0) lpsetup/handlers.py (+1/-1) lpsetup/settings.py (+2/-1) lpsetup/subcommands/inithost.py (+4/-3) lpsetup/subcommands/initrepo.py (+1/-2) lpsetup/tests/integration/non-lxc.py (+105/-0) |
To merge this branch: | bzr merge lp:~benji/lpsetup/bug-1020734-first-integration-test |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gary Poster (community) | Approve | ||
Review via email: mp+114044@code.launchpad.net |
Commit message
Add a first integration test.
Description of the change
This is a first cut at an integration test for lpsetup that uses juju to provision a clean EC2 instance and then uses that instance to run a test.
This first cut only tests init-host because I couldn't get init-repo to work yet. That is either a bug in init-repo or a deficiency in the test setup, either way I wanted to get this test landed and we can address testing init-repo separately.
See the README for instructions on running the test.
To post a comment you must log in.
Yay! Thank you! The following are random thoughts while looking at the
code. We can address all of them later, I think (post-landing) but I'd
like to address them one way or another. Maybe #1 should be addressed now.
1) I'm not sure how we can run this in tarmac as is; it will need to
transfer the branch as currently tested over to the other machine, and
not a particular branch. Maybe juju scp -r [the current code tree, as
calculated in the test by os.path fun with __file__] would be better for
transferring the code? Once we have that ironed out, and this branch
landed, I'd really like a new card that hooks up the integration test on
tarmac to be created and started ASAP.
2) I understand why python-shelltoolbox is needed but not why apache is
needed. Shouldn't lpsetup get apache?
3) I'm not sure why you have to set up bzr whoami, and I think lpsetup
is supposed to be able to do that. The test should probably take a
non-root user as argument, though. We can do that as a next step, though.
4) We can refine the time.sleep(30) later.
5) The lxc story will need to have lp-lxc-ip installed. I'd suggest
making the setup run python setup.py install, and then have the test run
the lp-setup from the environment.
6) The lxc story also will need to install lpsetup in the lxc container.
Normally that is done from the PPA, but we can't do that here, because
that would not test the branch that we currently are running. Since the
home directories are shared in the host and the directory, I think we
could have an option to initlxc that passes a directory, and means
"instead of getting the PPA in the container, use python setup.py
install [this directory]".
#6 runs counter to what I wrote in my previous email about this, but
there are many upsides to your alternative approach and I think we ought
to stick with it.
Thanks again!