AC-641 Added pattern to respond to key unlock prompt for project update.

This commit is contained in:
Chris Church 2013-11-15 01:22:47 -05:00
parent 7cd2707713
commit 2c4062e58b
2 changed files with 4 additions and 0 deletions

View File

@ -671,6 +671,7 @@ class RunProjectUpdate(BaseTask):
re.compile(r'^Password for.*:\s*?$', re.M): 'scm_password',
re.compile(r'^Password:\s*?$', re.M): 'scm_password',
re.compile(r'^\S+?@\S+?\'s\s+?password:\s*?$', re.M): 'scm_password',
re.compile(r'^Enter passphrase for .*:\s*?$', re.M): 'scm_key_unlock',
# FIXME: Configure whether we should auto accept host keys?
re.compile(r'^Are you sure you want to continue connecting \(yes/no\)\?\s*?$', re.M): 'yes',
})

View File

@ -901,6 +901,7 @@ class ProjectUpdatesTest(BaseTransactionTest):
self.assertEqual(pu.status, 'successful',
pu.result_stdout + pu.result_traceback)
else:
#print pu.result_stdout
pass # If should_fail is None, we don't care.
# Get the SCM URL from the job args, if it starts with a '/' we aren't
# handling the URL correctly.
@ -1393,6 +1394,8 @@ class ProjectUpdatesTest(BaseTransactionTest):
self.check_project_update(project, should_fail=None,
scm_key_unlock=TEST_SSH_KEY_DATA_UNLOCK,
project_update=project_update)
# Verify that we responded to ssh-agent prompt.
self.assertTrue('Identity added' in project_update.result_stdout)
def create_test_job_template(self, **kwargs):
opts = {