mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
AC-641 Added pattern to respond to key unlock prompt for project update.
This commit is contained in:
@@ -671,6 +671,7 @@ class RunProjectUpdate(BaseTask):
|
|||||||
re.compile(r'^Password for.*:\s*?$', re.M): 'scm_password',
|
re.compile(r'^Password for.*:\s*?$', re.M): 'scm_password',
|
||||||
re.compile(r'^Password:\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'^\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?
|
# 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',
|
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',
|
self.assertEqual(pu.status, 'successful',
|
||||||
pu.result_stdout + pu.result_traceback)
|
pu.result_stdout + pu.result_traceback)
|
||||||
else:
|
else:
|
||||||
|
#print pu.result_stdout
|
||||||
pass # If should_fail is None, we don't care.
|
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
|
# Get the SCM URL from the job args, if it starts with a '/' we aren't
|
||||||
# handling the URL correctly.
|
# handling the URL correctly.
|
||||||
@@ -1393,6 +1394,8 @@ class ProjectUpdatesTest(BaseTransactionTest):
|
|||||||
self.check_project_update(project, should_fail=None,
|
self.check_project_update(project, should_fail=None,
|
||||||
scm_key_unlock=TEST_SSH_KEY_DATA_UNLOCK,
|
scm_key_unlock=TEST_SSH_KEY_DATA_UNLOCK,
|
||||||
project_update=project_update)
|
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):
|
def create_test_job_template(self, **kwargs):
|
||||||
opts = {
|
opts = {
|
||||||
|
|||||||
Reference in New Issue
Block a user