Add simple_layout test decorator
And add it to test_no_job_project.
So that we can reduce the number of boilerplate git repos initialized
for every (or most) tests, make it simple to specify a single simple
layout file (like we used to do in zuul v2). The more complicated
scenarios can rely on the full copy-git-repos-from-test-fixtures
behavior, but simple tests can have that automatically generated from
a simple zuul.yaml file.
Change-Id: Ibeec4c526a1097823589f2c38a50e40dc346e0e5
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index 22ae46d..366354c 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -36,6 +36,7 @@
from tests.base import (
ZuulTestCase,
repack_repo,
+ simple_layout,
)
@@ -1910,6 +1911,7 @@
self.assertEqual(A.data['status'], 'MERGED')
self.assertEqual(A.reported, 2)
+ @simple_layout('layouts/no-jobs-project.yaml')
def test_no_job_project(self):
"Test that reports with no jobs don't get sent"
A = self.fake_gerrit.addFakeChange('org/no-jobs-project',