mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-10 10:01:48 -05:00
* release_3.0.2: (126 commits) Disable permissions tab in Credential > Edit form if Credential is private (#3288) Tweaked the popover text for job and skip tags on JT add/edit Workaround a cascade setnull polymorphic issue flake8 Fixed old test expectations Made it so the credential organization field can't be changed Skip some unit tests Fixed org auditor visibility of team credentials Fix sosreport fix credential kind options for list interpret any code below 300 as success bail when status code is over 300 Make CloudForms inventory_script work Use no_log when handling passwords Prevent ignored task from being displayed as failing. making ec2 cred optional on group->edit making ec2 credential optional for ec2 inventory Revert "Fix to ensure org auditors can see team credentials" Fixed team credential list to work with corrected permissions Making the username and password fields optional ...
50 lines
1.5 KiB
Python
50 lines
1.5 KiB
Python
|
|
# Python
|
|
import pytest
|
|
|
|
from awx.main.tests.factories import (
|
|
create_organization,
|
|
create_job_template,
|
|
create_notification_template,
|
|
create_survey_spec,
|
|
)
|
|
|
|
@pytest.fixture
|
|
def job_template_factory():
|
|
return create_job_template
|
|
|
|
@pytest.fixture
|
|
def organization_factory():
|
|
return create_organization
|
|
|
|
@pytest.fixture
|
|
def notification_template_factory():
|
|
return create_notification_template
|
|
|
|
@pytest.fixture
|
|
def survey_spec_factory():
|
|
return create_survey_spec
|
|
|
|
@pytest.fixture
|
|
def job_template_with_survey_passwords_factory(job_template_factory):
|
|
def rf(persisted):
|
|
"Returns job with linked JT survey with password survey questions"
|
|
objects = job_template_factory('jt', organization='org1', survey=[
|
|
{'variable': 'submitter_email', 'type': 'text', 'default': 'foobar@redhat.com'},
|
|
{'variable': 'secret_key', 'default': '6kQngg3h8lgiSTvIEb21', 'type': 'password'},
|
|
{'variable': 'SSN', 'type': 'password'}], persisted=persisted)
|
|
return objects.job_template
|
|
return rf
|
|
|
|
@pytest.fixture
|
|
def job_with_secret_key_unit(job_with_secret_key_factory):
|
|
return job_with_secret_key_factory(persisted=False)
|
|
|
|
@pytest.fixture
|
|
def get_ssh_version(mocker):
|
|
return mocker.patch('awx.main.tasks.get_ssh_version', return_value='OpenSSH_6.9p1, LibreSSL 2.1.8')
|
|
|
|
@pytest.fixture
|
|
def job_template_with_survey_passwords_unit(job_template_with_survey_passwords_factory):
|
|
return job_template_with_survey_passwords_factory(persisted=False)
|