Move some uses of updateConfigLayout to simple_layout

* test_post_ignore_deletes_negative
* _test_irrelevant_files_jobs
* test_inherited_jobs_keep_matchers
* test_check_smtp_pool
* test_queue_rate_limiting
* test_queue_rate_limiting_dependent
* test_footer_message

The appearance in test_multiple_sql_connections wasn't used.

Change-Id: Ib5bcd5df4254bd5182df087164cfb18b55a564fc
diff --git a/tests/fixtures/config/single-tenant/git/layout-dont-ignore-ref-deletes/playbooks/project-post.yaml b/tests/fixtures/config/single-tenant/git/layout-dont-ignore-ref-deletes/playbooks/project-post.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-dont-ignore-ref-deletes/playbooks/project-post.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-footer-message/playbooks/project-test1.yaml b/tests/fixtures/config/single-tenant/git/layout-footer-message/playbooks/project-test1.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-footer-message/playbooks/project-test1.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-irrelevant-starts-empty.yaml b/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-irrelevant-starts-empty.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-irrelevant-starts-empty.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-irrelevant-starts-full.yaml b/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-irrelevant-starts-full.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-irrelevant-starts-full.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-nomatch-starts-empty.yaml b/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-nomatch-starts-empty.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-nomatch-starts-empty.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-nomatch-starts-full.yaml b/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-nomatch-starts-full.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-inheritance/playbooks/project-test-nomatch-starts-full.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-irrelevant-files/playbooks/project-test-irrelevant-files.yaml b/tests/fixtures/config/single-tenant/git/layout-irrelevant-files/playbooks/project-test-irrelevant-files.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-irrelevant-files/playbooks/project-test-irrelevant-files.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-rate-limit/playbooks/project-merge.yaml b/tests/fixtures/config/single-tenant/git/layout-rate-limit/playbooks/project-merge.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-rate-limit/playbooks/project-merge.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-rate-limit/playbooks/project-test1.yaml b/tests/fixtures/config/single-tenant/git/layout-rate-limit/playbooks/project-test1.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-rate-limit/playbooks/project-test1.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-rate-limit/playbooks/project-test2.yaml b/tests/fixtures/config/single-tenant/git/layout-rate-limit/playbooks/project-test2.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-rate-limit/playbooks/project-test2.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-smtp/playbooks/project-merge.yaml b/tests/fixtures/config/single-tenant/git/layout-smtp/playbooks/project-merge.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-smtp/playbooks/project-merge.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-smtp/playbooks/project-test1.yaml b/tests/fixtures/config/single-tenant/git/layout-smtp/playbooks/project-test1.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-smtp/playbooks/project-test1.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-smtp/playbooks/project-test2.yaml b/tests/fixtures/config/single-tenant/git/layout-smtp/playbooks/project-test2.yaml
deleted file mode 100644
index f679dce..0000000
--- a/tests/fixtures/config/single-tenant/git/layout-smtp/playbooks/project-test2.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-- hosts: all
-  tasks: []
diff --git a/tests/fixtures/config/single-tenant/git/layout-dont-ignore-ref-deletes/zuul.yaml b/tests/fixtures/layouts/dont-ignore-ref-deletes.yaml
similarity index 100%
rename from tests/fixtures/config/single-tenant/git/layout-dont-ignore-ref-deletes/zuul.yaml
rename to tests/fixtures/layouts/dont-ignore-ref-deletes.yaml
diff --git a/tests/fixtures/config/single-tenant/git/layout-footer-message/zuul.yaml b/tests/fixtures/layouts/footer-message.yaml
similarity index 100%
rename from tests/fixtures/config/single-tenant/git/layout-footer-message/zuul.yaml
rename to tests/fixtures/layouts/footer-message.yaml
diff --git a/tests/fixtures/config/single-tenant/git/layout-inheritance/zuul.yaml b/tests/fixtures/layouts/inheritance.yaml
similarity index 100%
rename from tests/fixtures/config/single-tenant/git/layout-inheritance/zuul.yaml
rename to tests/fixtures/layouts/inheritance.yaml
diff --git a/tests/fixtures/config/single-tenant/git/layout-irrelevant-files/zuul.yaml b/tests/fixtures/layouts/irrelevant-files.yaml
similarity index 100%
rename from tests/fixtures/config/single-tenant/git/layout-irrelevant-files/zuul.yaml
rename to tests/fixtures/layouts/irrelevant-files.yaml
diff --git a/tests/fixtures/config/single-tenant/git/layout-rate-limit/zuul.yaml b/tests/fixtures/layouts/rate-limit.yaml
similarity index 100%
rename from tests/fixtures/config/single-tenant/git/layout-rate-limit/zuul.yaml
rename to tests/fixtures/layouts/rate-limit.yaml
diff --git a/tests/fixtures/config/single-tenant/git/layout-smtp/zuul.yaml b/tests/fixtures/layouts/smtp.yaml
similarity index 100%
rename from tests/fixtures/config/single-tenant/git/layout-smtp/zuul.yaml
rename to tests/fixtures/layouts/smtp.yaml
diff --git a/tests/unit/test_connection.py b/tests/unit/test_connection.py
index ee9a0b0..db32938 100644
--- a/tests/unit/test_connection.py
+++ b/tests/unit/test_connection.py
@@ -147,9 +147,6 @@
 
     def test_multiple_sql_connections(self):
         "Test putting results in different databases"
-        self.updateConfigLayout(
-            'tests/fixtures/layout-sql-reporter.yaml')
-
         # Add a successful result
         A = self.fake_gerrit.addFakeChange('org/project', 'master', 'A')
         self.fake_gerrit.addEvent(A.getPatchsetCreatedEvent(1))
diff --git a/tests/unit/test_scheduler.py b/tests/unit/test_scheduler.py
index 0981716..a721887 100755
--- a/tests/unit/test_scheduler.py
+++ b/tests/unit/test_scheduler.py
@@ -1106,12 +1106,9 @@
         self.assertEqual(len(self.history), 0)
         self.assertNotIn('project-post', job_names)
 
+    @simple_layout('layouts/dont-ignore-ref-deletes.yaml')
     def test_post_ignore_deletes_negative(self):
         "Test that deleting refs does trigger post jobs"
-
-        self.updateConfigLayout('layout-dont-ignore-ref-deletes')
-        self.sched.reconfigure(self.config)
-
         e = {
             "type": "ref-updated",
             "submitter": {
@@ -2115,9 +2112,6 @@
 
     def _test_irrelevant_files_jobs(self, should_skip):
         "Test that jobs with irrelevant-files filter run only when appropriate"
-        self.updateConfigLayout('layout-irrelevant-files')
-        self.sched.reconfigure(self.config)
-
         if should_skip:
             files = {'ignoreme': 'ignored\n'}
         else:
@@ -2138,16 +2132,16 @@
         else:
             self.assertIn(change.data['number'], tested_change_ids)
 
+    @simple_layout('layouts/irrelevant-files.yaml')
     def test_irrelevant_files_match_skips_job(self):
         self._test_irrelevant_files_jobs(should_skip=True)
 
+    @simple_layout('layouts/irrelevant-files.yaml')
     def test_irrelevant_files_no_match_runs_job(self):
         self._test_irrelevant_files_jobs(should_skip=False)
 
+    @simple_layout('layouts/inheritance.yaml')
     def test_inherited_jobs_keep_matchers(self):
-        self.updateConfigLayout('layout-inheritance')
-        self.sched.reconfigure(self.config)
-
         files = {'ignoreme': 'ignored\n'}
 
         change = self.fake_gerrit.addFakeChange('org/project',
@@ -3018,10 +3012,8 @@
                                          'layout-idle'))
             repo.git.reset('--hard', before)
 
+    @simple_layout('layouts/smtp.yaml')
     def test_check_smtp_pool(self):
-        self.updateConfigLayout('layout-smtp')
-        self.sched.reconfigure(self.config)
-
         A = self.fake_gerrit.addFakeChange('org/project', 'master', 'A')
         self.waitUntilSettled()
 
@@ -3407,10 +3399,9 @@
         self.executor_server.release()
         self.waitUntilSettled()
 
+    @simple_layout('layouts/rate-limit.yaml')
     def test_queue_rate_limiting(self):
         "Test that DependentPipelines are rate limited with dep across window"
-        self.updateConfigLayout('layout-rate-limit')
-        self.sched.reconfigure(self.config)
         self.executor_server.hold_jobs_in_build = True
         A = self.fake_gerrit.addFakeChange('org/project', 'master', 'A')
         B = self.fake_gerrit.addFakeChange('org/project', 'master', 'B')
@@ -3450,7 +3441,7 @@
         self.executor_server.release('project-.*')
         self.waitUntilSettled()
 
-        tenant = self.sched.abide.tenants.get('openstack')
+        tenant = self.sched.abide.tenants.get('tenant-one')
         queue = tenant.layout.pipelines['gate'].queues[0]
         # A failed so window is reduced by 1 to 1.
         self.assertEqual(queue.window, 1)
@@ -3498,10 +3489,9 @@
         self.assertEqual(queue.window_floor, 1)
         self.assertEqual(C.data['status'], 'MERGED')
 
+    @simple_layout('layouts/rate-limit.yaml')
     def test_queue_rate_limiting_dependent(self):
         "Test that DependentPipelines are rate limited with dep in window"
-        self.updateConfigLayout('layout-rate-limit')
-        self.sched.reconfigure(self.config)
         self.executor_server.hold_jobs_in_build = True
         A = self.fake_gerrit.addFakeChange('org/project', 'master', 'A')
         B = self.fake_gerrit.addFakeChange('org/project', 'master', 'B')
@@ -3539,7 +3529,7 @@
         self.executor_server.release('project-.*')
         self.waitUntilSettled()
 
-        tenant = self.sched.abide.tenants.get('openstack')
+        tenant = self.sched.abide.tenants.get('tenant-one')
         queue = tenant.layout.pipelines['gate'].queues[0]
         # A failed so window is reduced by 1 to 1.
         self.assertEqual(queue.window, 1)
@@ -3606,11 +3596,9 @@
         self.executor_server.release()
         self.waitUntilSettled()
 
+    @simple_layout('layouts/footer-message.yaml')
     def test_footer_message(self):
         "Test a pipeline's footer message is correctly added to the report."
-        self.updateConfigLayout('layout-footer-message')
-        self.sched.reconfigure(self.config)
-
         A = self.fake_gerrit.addFakeChange('org/project', 'master', 'A')
         A.addApproval('code-review', 2)
         self.executor_server.failJob('project-test1', A)