Drop test_node_label
With a little tweak, test_jobs_launched and test_job_branch sufficiently
test that jobs are launched on the correct node.
Change-Id: I6f65b4574e13f56409f7d1e4e88fc1cd15ba1fda
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index 6426692..9b13449 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -56,6 +56,7 @@
self.assertEqual(A.reported, 2)
self.assertEqual(self.getJobFromHistory('project-test1').node,
'image1')
+ self.assertIsNone(self.getJobFromHistory('project-test2').node)
# TODOv3(jeblair): we may want to report stats by tenant (also?).
self.assertReportedStat('gerrit.event.comment-added', value='1|c')
@@ -2247,21 +2248,6 @@
self.assertEqual(B.reported, 1)
self.assertFalse('test-mutex' in self.sched.mutex.mutexes)
- @skip("Disabled for early v3 development")
- def test_node_label(self):
- "Test that a job runs on a specific node label"
- self.worker.registerFunction('build:node-project-test1:debian')
-
- A = self.fake_gerrit.addFakeChange('org/node-project', 'master', 'A')
- A.addApproval('code-review', 2)
- self.fake_gerrit.addEvent(A.addApproval('approved', 1))
- self.waitUntilSettled()
-
- self.assertIsNone(self.getJobFromHistory('node-project-merge').node)
- self.assertEqual(self.getJobFromHistory('node-project-test1').node,
- 'debian')
- self.assertIsNone(self.getJobFromHistory('node-project-test2').node)
-
def test_live_reconfiguration(self):
"Test that live reconfiguration works"
self.launch_server.hold_jobs_in_build = True