mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-13 07:18:35 -05:00
remove fail_on_job_failure from the workflow status PR
This commit is contained in:
@@ -92,20 +92,14 @@ class TestWorkflowJobTemplate:
|
||||
|
||||
@pytest.mark.django_db
|
||||
class TestWorkflowJobFailure:
|
||||
"""
|
||||
Tests to re-implement if workflow failure status is introduced in
|
||||
a future Tower version.
|
||||
"""
|
||||
@pytest.fixture
|
||||
def wfj(self):
|
||||
return WorkflowJob.objects.create(name='test-wf-job')
|
||||
|
||||
def test_workflow_has_failed(self, wfj):
|
||||
"""
|
||||
Test that a single failed node with fail_on_job_failure = true
|
||||
leads to the entire WF being marked as failed
|
||||
"""
|
||||
job = Job.objects.create(name='test-job', status='failed')
|
||||
# Node has a failed job connected
|
||||
WorkflowJobNode.objects.create(workflow_job=wfj, job=job)
|
||||
assert wfj._has_failed()
|
||||
|
||||
def test_workflow_not_failed_unran_job(self, wfj):
|
||||
"""
|
||||
Test that an un-ran node will not mark workflow job as failed
|
||||
@@ -124,8 +118,7 @@ class TestWorkflowJobFailure:
|
||||
def test_workflow_not_failed_failed_job_but_okay(self, wfj):
|
||||
"""
|
||||
Test that a failed node will not mark workflow job as failed
|
||||
if the fail_on_job_failure is set to false
|
||||
"""
|
||||
job = Job.objects.create(name='test-job', status='failed')
|
||||
WorkflowJobNode.objects.create(workflow_job=wfj, job=job, fail_on_job_failure=False)
|
||||
WorkflowJobNode.objects.create(workflow_job=wfj, job=job)
|
||||
assert not wfj._has_failed()
|
||||
|
||||
Reference in New Issue
Block a user