launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #09807
[Merge] lp:~benji/lpsetup/more-tarmac-friendly into lp:lpsetup
Benji York has proposed merging lp:~benji/lpsetup/more-tarmac-friendly into lp:lpsetup.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~benji/lpsetup/more-tarmac-friendly/+merge/114263
This branch makes the integration test more tarmac friendly by reducing
the number of prompts generated and providing a way to totally remove
them by adding SSH configuration.
I decided to use the -o option to juju ssh and juju scp even though it
is unnecessary if the SSH config changes given in the README are used
because this way even a user who hasn't read the README or who doesn't
want to make the changes still gets some benefit.
Bonus: I also added a bit about how to install and use the PEP-8 checker.
--
https://code.launchpad.net/~benji/lpsetup/more-tarmac-friendly/+merge/114263
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~benji/lpsetup/more-tarmac-friendly into lp:lpsetup.
=== modified file 'README.rst'
--- README.rst 2012-07-09 20:55:44 +0000
+++ README.rst 2012-07-10 20:10:23 +0000
@@ -56,6 +56,13 @@
you must create an appropriately configured juju environment with that
name before running the tests.
+You may also want to add this to your SSH .config file to suppress the
+many yes/no prompts:
+
+ Host *.amazonaws.com
+ StrictHostKeyChecking no
+ UserKnownHostsFile /dev/null
+
Linting
~~~~~~~
@@ -70,6 +77,14 @@
pocketlint lpsetup/**/*.py
+Install pep8::
+
+ sudo apt-get install pep8
+
+Run pep8::
+
+ pep8 lpsetup/**/*.py
+
lp-lxc-ip
=========
=== modified file 'lpsetup/tests/integration/non-lxc.py'
--- lpsetup/tests/integration/non-lxc.py 2012-07-10 16:16:39 +0000
+++ lpsetup/tests/integration/non-lxc.py 2012-07-10 20:10:23 +0000
@@ -26,7 +26,9 @@
if type(args) == str:
args = args.split()
- check_call('juju ssh 1 -e lpsetup-testing'.split() + list(args))
+ check_call('juju ssh 1 -o StrictHostKeyChecking=no'
+ ' -o UserKnownHostsFile=/dev/null -e lpsetup-testing'.split()
+ + list(args))
def check_environment():
@@ -66,7 +68,9 @@
on_remote('sudo apt-add-repository --yes ppa:yellow/ppa')
on_remote('sudo apt-get update')
on_remote('sudo apt-get install python-shelltoolbox')
- check_call('juju scp -e lpsetup-testing -r . 1:lpsetup'.split())
+ check_call('juju scp -o StrictHostKeyChecking=no'
+ ' -o UserKnownHostsFile=/dev/null -e lpsetup-testing'
+ ' -r . 1:lpsetup'.split())
def do_test():
@@ -80,7 +84,7 @@
def tear_down():
banner('Cleaning up.')
- code = os.system('juju destroy-environment -e lpsetup-testing')
+ code = os.system('echo y | juju destroy-environment -e lpsetup-testing')
if code != 0:
raise RuntimeError('Destroying the test juju environment failed.')