Re-enable test_live_reconfiguration_del_project

More or less straight forward port. Because of the consolidation of test
names in v3 layout, test1-project1 no longer exists, so we have to pass the
project name into getJobFromHistory.

Since the next test down was deemed irrelevant, squashing its removal
onto this patch to reduce reviewer load.

Change-Id: Ib6b047ba4a3bc16c4ec04f8ba64653098deec023
Story: 2000773
Task: 4115
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index 7de9be0..6f2e7ce 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -2600,7 +2600,6 @@
         self.assertEqual(B.data['status'], 'MERGED')
         self.assertEqual(B.reported, 2)
 
-    @skip("Disabled for early v3 development")
     def test_live_reconfiguration_del_project(self):
         # Test project deletion from layout
         # while changes are enqueued
@@ -2623,14 +2622,14 @@
         self.assertEqual(len(self.builds), 5)
 
         # This layout defines only org/project, not org/project1
-        self.updateConfigLayout(
-            'tests/fixtures/layout-live-reconfiguration-del-project.yaml')
+        self.commitLayoutUpdate('common-config',
+                                'layout-live-reconfiguration-del-project')
         self.sched.reconfigure(self.config)
         self.waitUntilSettled()
 
         # Builds for C aborted, builds for A succeed,
         # and have change B applied ahead
-        job_c = self.getJobFromHistory('project1-test1')
+        job_c = self.getJobFromHistory('project-test1')
         self.assertEqual(job_c.changes, '3,1')
         self.assertEqual(job_c.result, 'ABORTED')
 
@@ -2638,8 +2637,9 @@
         self.executor_server.release()
         self.waitUntilSettled()
 
-        self.assertEqual(self.getJobFromHistory('project-test1').changes,
-                         '2,1 1,1')
+        self.assertEqual(
+            self.getJobFromHistory('project-test1', 'org/project').changes,
+            '2,1 1,1')
 
         self.assertEqual(A.data['status'], 'NEW')
         self.assertEqual(B.data['status'], 'NEW')
@@ -2648,40 +2648,11 @@
         self.assertEqual(B.reported, 0)
         self.assertEqual(C.reported, 0)
 
-        self.assertEqual(len(self.sched.layout.pipelines['check'].queues), 0)
+        tenant = self.sched.abide.tenants.get('tenant-one')
+        self.assertEqual(len(tenant.layout.pipelines['check'].queues), 0)
         self.assertIn('Build succeeded', A.messages[0])
 
     @skip("Disabled for early v3 development")
-    def test_live_reconfiguration_functions(self):
-        "Test live reconfiguration with a custom function"
-        self.worker.registerFunction('build:node-project-test1:debian')
-        self.worker.registerFunction('build:node-project-test1:wheezy')
-        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)
-
-        self.updateConfigLayout(
-            'tests/fixtures/layout-live-reconfiguration-functions.yaml')
-        self.sched.reconfigure(self.config)
-        self.worker.build_history = []
-
-        B = self.fake_gerrit.addFakeChange('org/node-project', 'master', 'B')
-        B.addApproval('code-review', 2)
-        self.fake_gerrit.addEvent(B.addApproval('approved', 1))
-        self.waitUntilSettled()
-
-        self.assertIsNone(self.getJobFromHistory('node-project-merge').node)
-        self.assertEqual(self.getJobFromHistory('node-project-test1').node,
-                         'wheezy')
-        self.assertIsNone(self.getJobFromHistory('node-project-test2').node)
-
-    @skip("Disabled for early v3 development")
     def test_delayed_repo_init(self):
         self.updateConfigLayout(
             'tests/fixtures/layout-delayed-repo-init.yaml')