summaryrefslogtreecommitdiff
path: root/tests/unit/test_github_driver.py
diff options
context:
space:
mode:
authorTobias Henkel <tobias.henkel@bmw.de>2021-04-08 08:38:19 +0200
committerJames E. Blair <jim@acmegating.com>2021-04-21 14:53:54 -0700
commitfc11cf133465f08a3263f3dc176edc6cd4b9dc7a (patch)
tree7db3004df131470c7935842639845cca7aaf13d9 /tests/unit/test_github_driver.py
parentf7f689c87dabaf63d246023767daa06aac269e43 (diff)
downloadzuul-fc11cf133465f08a3263f3dc176edc6cd4b9dc7a.tar.gz
Fix repo state restore / Keep jobgraphs frozen
This is two changes squashed. First: Fix missing repo state restore The global repo state handling misses the restoration of the repo states of projects that are not part of the dependency chain. This can be generically fixed by ensuring that the repo state is restored immediately after clone into the job workspace. Original Change-Id: I61db67edb3952cdba7709b5b597dac93be4b6dde Second: Keep jobgraphs frozen across reconfiguration This removes test cases which are no longer be relevant. Many of these were testing various mutations across reconfigurations, but with job graphs frozen, about the only thing that we expect to change now is when a pipeline, project, or tenant is deleted. Test cases are modified or added to test these. It appears even the current code may have some bugs related to deleting pipelines and tenants. The improved testing in this change highlighted that. The scheduler is updated to ensure that it cancels all jobs on pipelines or tenants that are removed from a running configuration. This should ensure we don't leak nodes or semaphores. Change-Id: I2e4bd2fb9222b49cb10661d28d4c52a3c994ba62 Co-Authored-By: James E. Blair <jim@acmegating.com>
Diffstat (limited to 'tests/unit/test_github_driver.py')
-rw-r--r--tests/unit/test_github_driver.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test_github_driver.py b/tests/unit/test_github_driver.py
index c85974e1d..48f566938 100644
--- a/tests/unit/test_github_driver.py
+++ b/tests/unit/test_github_driver.py
@@ -350,7 +350,7 @@ class TestGithubDriver(ZuulTestCase):
# Stop queuing timer triggered jobs so that the assertions
# below don't race against more jobs being queued.
self.commitConfigUpdate('org/common-config',
- 'layouts/basic-github.yaml')
+ 'layouts/no-timer-github.yaml')
self.scheds.execute(lambda app: app.sched.reconfigure(app.config))
self.waitUntilSettled()
# If APScheduler is in mid-event when we remove the job, we