mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
AC-641 Added pattern to respond to key unlock prompt for project update.
This commit is contained in:
parent
7cd2707713
commit
2c4062e58b
@ -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',
|
||||
})
|
||||
|
||||
@ -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 = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user