Re-enable test_job_from_templates_launched job
There is a slight different in the zuulv3 syntax, we appear to lose
the ability to define template variables. The zuul configuration has
been updated accordingly.
Change-Id: I060eab9df841ce7ebcc6ae367e2122c5e7c01f55
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index c9005f0..f91401c 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -1227,20 +1227,6 @@
self.assertNotEqual(commit_A, commit_B, commit_C)
@skip("Disabled for early v3 development")
- def test_job_from_templates_launched(self):
- "Test whether a job generated via a template can be launched"
-
- A = self.fake_gerrit.addFakeChange(
- 'org/templated-project', 'master', 'A')
- self.fake_gerrit.addEvent(A.getPatchsetCreatedEvent(1))
- self.waitUntilSettled()
-
- self.assertEqual(self.getJobFromHistory('project-test1').result,
- 'SUCCESS')
- self.assertEqual(self.getJobFromHistory('project-test2').result,
- 'SUCCESS')
-
- @skip("Disabled for early v3 development")
def test_layered_templates(self):
"Test whether a job generated via a template can be launched"
@@ -4679,3 +4665,20 @@
self.assertEqual(A.reported, 2)
self.assertEqual(B.data['status'], 'MERGED')
self.assertEqual(B.reported, 2)
+
+
+class TestSchedulerTemplatedProject(ZuulTestCase):
+ tenant_config_file = 'config/templated-project/main.yaml'
+
+ def test_job_from_templates_launched(self):
+ "Test whether a job generated via a template can be launched"
+
+ A = self.fake_gerrit.addFakeChange(
+ 'org/templated-project', 'master', 'A')
+ self.fake_gerrit.addEvent(A.getPatchsetCreatedEvent(1))
+ self.waitUntilSettled()
+
+ self.assertEqual(self.getJobFromHistory('project-test1').result,
+ 'SUCCESS')
+ self.assertEqual(self.getJobFromHistory('project-test2').result,
+ 'SUCCESS')