Reload configuration when branches are created or deleted
The creation or deletion of branches can have a substantial impact
on Zuul's configuration. Ensure that we update the config (for
the impacted project) whenever a branch is created or deleted.
Change-Id: Id675e8a4e82294a7aa41ee18630a5e2ca80b0790
diff --git a/tests/unit/test_v3.py b/tests/unit/test_v3.py
index 2293ca0..ab3bdcd 100755
--- a/tests/unit/test_v3.py
+++ b/tests/unit/test_v3.py
@@ -444,6 +444,9 @@
file_dict = {'.zuul.yaml': in_repo_conf,
'playbooks/project-test2.yaml': in_repo_playbook}
self.create_branch('org/project', 'stable')
+ self.fake_gerrit.addEvent(
+ self.fake_gerrit.getFakeBranchCreatedEvent(
+ 'org/project', 'stable'))
A = self.fake_gerrit.addFakeChange('org/project', 'stable', 'A',
files=file_dict)
A.addApproval('Code-Review', 2)
@@ -484,6 +487,9 @@
# it from a different branch on a different repo.
self.create_branch('org/project1', 'stable')
+ self.fake_gerrit.addEvent(
+ self.fake_gerrit.getFakeBranchCreatedEvent(
+ 'org/project1', 'stable'))
in_repo_conf = textwrap.dedent(
"""