Re-enable test_layered_templates test
Change-Id: Ica7deccdc1d6183ba5e781df020f7e77294e6e25 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
86085b302e
commit
3adf72f4fc
@ -53,13 +53,45 @@
|
||||
- project-test1
|
||||
- project-test2
|
||||
|
||||
- project-template:
|
||||
name: test-three-and-four
|
||||
check:
|
||||
jobs:
|
||||
- layered-project-test3
|
||||
- layered-project-test4
|
||||
|
||||
- project-template:
|
||||
name: test-five
|
||||
check:
|
||||
jobs:
|
||||
- layered-project-foo-test5
|
||||
|
||||
- job:
|
||||
name: project-test1
|
||||
|
||||
- job:
|
||||
name: project-test2
|
||||
|
||||
- job:
|
||||
name: layered-project-test3
|
||||
|
||||
- job:
|
||||
name: layered-project-test4
|
||||
|
||||
- job:
|
||||
name: layered-project-foo-test5
|
||||
|
||||
- project:
|
||||
name: org/templated-project
|
||||
templates:
|
||||
- test-one-and-two
|
||||
|
||||
- project:
|
||||
name: org/layered-project
|
||||
templates:
|
||||
- test-one-and-two
|
||||
- test-three-and-four
|
||||
- test-five
|
||||
check:
|
||||
jobs:
|
||||
- project-test6
|
||||
|
1
tests/fixtures/config/templated-project/git/org_layered-project/README
vendored
Normal file
1
tests/fixtures/config/templated-project/git/org_layered-project/README
vendored
Normal file
@ -0,0 +1 @@
|
||||
test
|
23
tests/fixtures/layout.yaml
vendored
23
tests/fixtures/layout.yaml
vendored
@ -142,19 +142,6 @@ jobs:
|
||||
- project1
|
||||
- extratag
|
||||
|
||||
project-templates:
|
||||
- name: test-one-and-two
|
||||
check:
|
||||
- '{projectname}-test1'
|
||||
- '{projectname}-test2'
|
||||
- name: test-three-and-four
|
||||
check:
|
||||
- '{name}-test3'
|
||||
- '{name}-test4'
|
||||
- name: test-five
|
||||
check:
|
||||
- '{name}-{something}-test5'
|
||||
|
||||
projects:
|
||||
- name: org/project
|
||||
merge-mode: cherry-pick
|
||||
@ -229,16 +216,6 @@ projects:
|
||||
post:
|
||||
- nonvoting-project-post
|
||||
|
||||
- name: org/layered-project
|
||||
template:
|
||||
- name: test-one-and-two
|
||||
projectname: project
|
||||
- name: test-three-and-four
|
||||
- name: test-five
|
||||
something: foo
|
||||
check:
|
||||
- project-test6
|
||||
|
||||
- name: org/node-project
|
||||
gate:
|
||||
- node-project-merge:
|
||||
|
@ -1226,28 +1226,6 @@ jobs:
|
||||
self.assertNotEqual(ref_A, ref_B, ref_C)
|
||||
self.assertNotEqual(commit_A, commit_B, commit_C)
|
||||
|
||||
@skip("Disabled for early v3 development")
|
||||
def test_layered_templates(self):
|
||||
"Test whether a job generated via a template can be launched"
|
||||
|
||||
A = self.fake_gerrit.addFakeChange(
|
||||
'org/layered-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')
|
||||
self.assertEqual(self.getJobFromHistory('layered-project-test3'
|
||||
).result, 'SUCCESS')
|
||||
self.assertEqual(self.getJobFromHistory('layered-project-test4'
|
||||
).result, 'SUCCESS')
|
||||
self.assertEqual(self.getJobFromHistory('layered-project-foo-test5'
|
||||
).result, 'SUCCESS')
|
||||
self.assertEqual(self.getJobFromHistory('project-test6').result,
|
||||
'SUCCESS')
|
||||
|
||||
def test_dependent_changes_dequeue(self):
|
||||
"Test that dependent patches are not needlessly tested"
|
||||
|
||||
@ -4682,3 +4660,24 @@ class TestSchedulerTemplatedProject(ZuulTestCase):
|
||||
'SUCCESS')
|
||||
self.assertEqual(self.getJobFromHistory('project-test2').result,
|
||||
'SUCCESS')
|
||||
|
||||
def test_layered_templates(self):
|
||||
"Test whether a job generated via a template can be launched"
|
||||
|
||||
A = self.fake_gerrit.addFakeChange(
|
||||
'org/layered-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')
|
||||
self.assertEqual(self.getJobFromHistory('layered-project-test3'
|
||||
).result, 'SUCCESS')
|
||||
self.assertEqual(self.getJobFromHistory('layered-project-test4'
|
||||
).result, 'SUCCESS')
|
||||
self.assertEqual(self.getJobFromHistory('layered-project-foo-test5'
|
||||
).result, 'SUCCESS')
|
||||
self.assertEqual(self.getJobFromHistory('project-test6').result,
|
||||
'SUCCESS')
|
||||
|
Loading…
Reference in New Issue
Block a user