Re-enable test_no_job_project

Minimal changes are needed, just translation of the old layout to new
and tenant API differences.

Change-Id: I3563fd1998dcc16426d665d50e26644b45198be0
Story: 2000773
Task: 3429
This commit is contained in:
Clint Byrum
2016-12-13 11:54:33 -08:00
parent 13c6b4a6d8
commit 883c30e947
3 changed files with 14 additions and 2 deletions

View File

@@ -103,6 +103,11 @@
name: nonvoting-project-test2
voting: false
- job:
name: project-testfile
files:
- '.*-requires'
- project:
name: org/project
check:
@@ -180,3 +185,9 @@
jobs:
- nonvoting-project-test1
- nonvoting-project-test2
- project:
name: org/no-jobs-project
check:
jobs:
- project-testfile

View File

@@ -0,0 +1 @@
staypuft

View File

@@ -1963,7 +1963,6 @@ class TestScheduler(ZuulTestCase):
self.assertEqual(A.data['status'], 'MERGED')
self.assertEqual(A.reported, 2)
@skip("Disabled for early v3 development")
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',
@@ -1975,7 +1974,8 @@ class TestScheduler(ZuulTestCase):
self.assertEqual(A.reported, False)
# Check queue is empty afterwards
check_pipeline = self.sched.layout.pipelines['check']
tenant = self.sched.abide.tenants.get('tenant-one')
check_pipeline = tenant.layout.pipelines['check']
items = check_pipeline.getAllItems()
self.assertEqual(len(items), 0)