summaryrefslogtreecommitdiff
path: root/tests/unit/test_cross_crd.py
diff options
context:
space:
mode:
authorJames E. Blair <jim@acmegating.com>2022-03-05 12:31:43 -0800
committerJames E. Blair <jim@acmegating.com>2022-03-21 12:54:02 -0700
commit249ccc403b96842ea0c2e8f187c7fce6ef9be786 (patch)
tree063e4f0c948a0742c49ea635865a6cbafcb10aa2 /tests/unit/test_cross_crd.py
parent81d84e7c15d46a7e4b3557824552b941e4c60182 (diff)
downloadzuul-249ccc403b96842ea0c2e8f187c7fce6ef9be786.tar.gz
Report per-branch cyclic-dependency conflicts
If a cycle of dependencies is attempted to be enqueued into a pipeline and at least one of the participating projects has a per-branch change queue and the changes in the cycle are in different branches, it can be confusing for users why the changes were not enqueued. This is even more likely to happen with implicit cyclic dependencies such as those from Gerrit's submitted-together feature (but can happen with any driver). To aid users in this situation, report this situation back to the code review system. Change-Id: I26174849deab627b2cf91d75029c5a2674cc37d6
Diffstat (limited to 'tests/unit/test_cross_crd.py')
-rw-r--r--tests/unit/test_cross_crd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/test_cross_crd.py b/tests/unit/test_cross_crd.py
index 442277f51..42d86275b 100644
--- a/tests/unit/test_cross_crd.py
+++ b/tests/unit/test_cross_crd.py
@@ -669,7 +669,7 @@ class TestGithubToGerritCRD(ZuulTestCase):
# should not be processed in dependent pipeline
self.assertFalse(A.is_merged)
self.assertEqual(B.data['status'], 'NEW')
- self.assertEqual(len(A.comments), 0)
+ self.assertEqual(len(A.comments), 1)
self.assertEqual(B.reported, 0)
self.assertEqual(len(self.history), 0)
@@ -688,7 +688,7 @@ class TestGithubToGerritCRD(ZuulTestCase):
self.waitUntilSettled()
self.assertTrue(A.is_merged)
- self.assertEqual(len(A.comments), 2)
+ self.assertEqual(len(A.comments), 3)
self.assertEqual(B.data['status'], 'MERGED')
self.assertEqual(B.reported, 0)