mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 05:47:38 -02:30
Merge pull request #3783 from AlanCoding/passwords_and_relaunching
Allow relaunching other user jobs with public vars Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -11,6 +11,7 @@ from awx.main.access import (
|
||||
JobTemplateAccess,
|
||||
WorkflowJobTemplateAccess,
|
||||
SystemJobTemplateAccess,
|
||||
vars_are_encrypted
|
||||
)
|
||||
|
||||
from awx.main.models import (
|
||||
@@ -114,6 +115,20 @@ class TestRelatedFieldAccess:
|
||||
'related', mocker.MagicMock, data, obj=resource, mandatory=True)
|
||||
|
||||
|
||||
def test_encrypted_vars_detection():
|
||||
assert vars_are_encrypted({
|
||||
'aaa': {'b': 'c'},
|
||||
'alist': [],
|
||||
'test_var_eight': '$encrypted$UTF8$AESCBC$Z0FBQUF...==',
|
||||
'test_var_five': 'four',
|
||||
})
|
||||
assert not vars_are_encrypted({
|
||||
'aaa': {'b': 'c'},
|
||||
'alist': [],
|
||||
'test_var_five': 'four',
|
||||
})
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def job_template_with_ids(job_template_factory):
|
||||
# Create non-persisted objects with IDs to send to job_template_factory
|
||||
|
||||
Reference in New Issue
Block a user