Merge lp:~frankban/lpsetup/complete-tests into lp:lpsetup
| Status: | Merged |
|---|---|
| Approved by: | Francesco Banconi on 2012-07-20 |
| Approved revision: | 74 |
| Merged at revision: | 58 |
| Proposed branch: | lp:~frankban/lpsetup/complete-tests |
| Merge into: | lp:lpsetup |
| Diff against target: |
1050 lines (+309/-205) 15 files modified
lpsetup/handlers.py (+51/-21) lpsetup/subcommands/finish_inithost.py (+11/-28) lpsetup/subcommands/inithost.py (+48/-26) lpsetup/subcommands/initlxc.py (+10/-11) lpsetup/subcommands/initrepo.py (+10/-1) lpsetup/subcommands/install_lxc.py (+24/-25) lpsetup/subcommands/update.py (+24/-37) lpsetup/tests/subcommands/test_finish_inithost.py (+4/-9) lpsetup/tests/subcommands/test_inithost.py (+19/-18) lpsetup/tests/subcommands/test_initlxc.py (+1/-0) lpsetup/tests/subcommands/test_initrepo.py (+2/-11) lpsetup/tests/subcommands/test_install_lxc.py (+5/-5) lpsetup/tests/subcommands/test_update.py (+8/-11) lpsetup/tests/test_handlers.py (+81/-2) lpsetup/tests/utils.py (+11/-0) |
| To merge this branch: | bzr merge lp:~frankban/lpsetup/complete-tests |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brad Crittenden (community) | code | 2012-07-20 | Approve on 2012-07-20 |
|
Review via email:
|
|||
Commit Message
Commands updated to reflect the new proposed UI and to support the parallel tests story (buildbot, http, no-checkout).
Description of the Change
Sorry, the diff is huge, I had to change several things to support the "buildbot-
lp-setup install-lxc -B `bzr info | grep parent | cut -c 18-`
-u buildbot -E <email address hidden> -f 'Launchpad PQM' -r
/var/
--use-http
== Changes ==
Changed UI for *finish_inithost* and *update* commands, as described in my email this morning: they now accept a *target_dir* defaulting to current directory.
handle_
handle_
handle_target_dir: just makes namespace.
Renamed *code_dir* and *working_dir* to *target_dir*.
s/ensure_
Added a *setup_home* step to init-host: from the docstring::
This is a separate step for several reasons::
- It is directly called by *initlxc* as one of its first steps.
Note that *initlxc* needs the user's `.ssh` dir to be set up
to be able to connect to the container.
- *initlxc* should be able to skip this step when re-executing
user home two times. Note: the user home is bind mounted by lxc.
Consequentially `changed initlxc.
inithost: moved the code calling *setup_ssh* and *bzr whoami/lp-login* from *initialize_base* to *initialize*, so that the ssh directory and bzr login are set up only once by initlxc.
initlxc: moved initialize() up at the beginning of the file so that it's easier to follow the code flow.
initrepo: setup_bzr_locations is now only called when the user Launchpad login can be retrieved. The check is done defining a call_setup_
install_lxc: steps updated to reflect the new UI. Added support for --no-checkout in *init_repo_in_lxc*. Updated *cmd_in_lxc* to ssh as the given user rather than ssh as root and then run sudo.
Moved lpuser and skip_if_no_lpuser definition from `tests.
Added a testcase for `handlers.
- 71. By Francesco Banconi on 2012-07-20
-
Multi line docstring fix.
- 72. By Francesco Banconi on 2012-07-20
-
Remove print statement.
- 73. By Francesco Banconi on 2012-07-20
-
Fixed typo.
- 74. By Francesco Banconi on 2012-07-20
-
Better docstring for handlers. Removed unused function.
| Francesco Banconi (frankban) wrote : | # |
Thanks Brad.
Branch updated following your suggestions.
Also removed the "print CMD..." line.

Hi Francesco,
* For handlers it would be nice to note any dependencies, e.g. handle_target_dir could note that it must be listed after handle_ target_ from_repository , otherwise namespace. target_ dir
* At line 175 multi-line docstrings should close on a separate line.
* Did you intend to leave the output CMD= at line 393?
* Typo at line 900 /happen/happens/
Otherwise this branch looks good and is a nice change to make the cli nice for 'update'. Thanks.