mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
save state
This commit is contained in:
parent
09dff99340
commit
916c92ffc7
@ -2957,6 +2957,8 @@ class WorkflowJobTemplateNodeChildrenBaseList(WorkflowsEnforcementMixin, Enforce
|
||||
if parent.id == sub.id:
|
||||
return {"Error": _("Cycle detected.")}
|
||||
|
||||
if parent.id == sub.id
|
||||
|
||||
if WorkflowJobTemplateNode.objects.filter(Q(pk=parent.id) &
|
||||
Q(success_nodes__in=[sub.id]) |
|
||||
Q(failure_nodes__in=[sub.id]) |
|
||||
|
||||
@ -110,6 +110,17 @@ class TestExclusivePathEnforcement():
|
||||
if index != 0:
|
||||
assert {'Error': 'Relationship not allowed.'} == json.loads(r.content)
|
||||
|
||||
@pytest.mark.parametrize("relationship", ['success', 'failure', 'always']):
|
||||
def test_existing_relationship_allowed(self, post, admin_user, n1, n2, relationship):
|
||||
r = post(self.generate_url(path, n1.id),
|
||||
data={'associate': True, 'id': n2.id},
|
||||
user=admin_user,
|
||||
expect=204)
|
||||
r = post(self.generate_url(path, n1.id),
|
||||
data={'associate': True, 'id': n2.id},
|
||||
user=admin_user,
|
||||
expect=200)
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
class TestNodeCredentials:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user