Test plugin should set SSH_AGENT_PID and SSH_AGENT_SOCK if declared

Bug #1271803 reported by David Britton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charm Tools
Fix Released
Undecided
David Britton

Bug Description

Otherwise, when you need to branch charms that you are developing/testing, you get prompted for your key passphrase.

2014-01-22 20:17:04 Starting deployment of cstack2
Enter passphrase for key '/home/dpb/.ssh/id_rsa':
Enter passphrase for key '/home/dpb/.ssh/id_rsa':
Enter passphrase for key '/home/dpb/.ssh/id_rsa':
Enter passphrase for key '/home/dpb/.ssh/id_rsa':
Enter passphrase for key '/home/dpb/.ssh/id_rsa':

After some testing, I have just inserted the following:

 class Conductor(object):
     def __init__(self, arguments=None):
         self.args = arguments
         self.env = {'JUJU_HOME': os.path.expanduser('~/.juju')}
+ self.env.update(os.environ)

Which seems to be working fine. In thinking things out, passing env variables down to the script seems to be pretty necessary for any kind of test framework.

Tags: landscape

Related branches

David Britton (dpb)
description: updated
Revision history for this message
David Britton (dpb) wrote :

Also, I notice that things like "juju ssh" in a test doesn't work without this change, you get "ssh not found in path".

David Britton (dpb)
Changed in charm-tools:
assignee: nobody → David Britton (davidpbritton)
status: New → In Progress
Marco Ceppi (marcoceppi)
Changed in charm-tools:
milestone: none → 1.2.9
Marco Ceppi (marcoceppi)
Changed in charm-tools:
status: In Progress → Fix Committed
Marco Ceppi (marcoceppi)
Changed in charm-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.