Re-enable test_delayed_repo_init

Porting this test needed some fundamental help because we haven't had
any tests that required changing the tenant config before.

Change-Id: Ife0bf391340d24f33b516afdb24626415ad7d65f
Story: 2001134
Task: 4847
diff --git a/tests/fixtures/layout-delayed-repo-init.yaml b/tests/fixtures/layout-delayed-repo-init.yaml
deleted file mode 100644
index 04dc010..0000000
--- a/tests/fixtures/layout-delayed-repo-init.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
-pipelines:
-  - name: check
-    manager: IndependentPipelineManager
-    trigger:
-      gerrit:
-        - event: patchset-created
-    success:
-      gerrit:
-        Verified: 1
-    failure:
-      gerrit:
-        Verified: -1
-
-  - name: post
-    manager: IndependentPipelineManager
-    trigger:
-      gerrit:
-        - event: ref-updated
-          ref: ^(?!refs/).*$
-
-  - name: gate
-    manager: DependentPipelineManager
-    failure-message: Build failed.  For information on how to proceed, see http://wiki.example.org/Test_Failures
-    trigger:
-      gerrit:
-        - event: comment-added
-          approval:
-            - Approved: 1
-    success:
-      gerrit:
-        Verified: 2
-        submit: true
-    failure:
-      gerrit:
-        Verified: -2
-    start:
-      gerrit:
-        Verified: 0
-    precedence: high
-
-projects:
-  - name: org/new-project
-    check:
-      - project-merge:
-        - project-test1
-        - project-test2
-    gate:
-      - project-merge:
-        - project-test1
-        - project-test2
-    post:
-      - project-post
diff --git a/tests/fixtures/layouts/delayed-repo-init.yaml b/tests/fixtures/layouts/delayed-repo-init.yaml
new file mode 100644
index 0000000..e97d37a
--- /dev/null
+++ b/tests/fixtures/layouts/delayed-repo-init.yaml
@@ -0,0 +1,77 @@
+- pipeline:
+    name: check
+    manager: independent
+    trigger:
+      gerrit:
+        - event: patchset-created
+    success:
+      gerrit:
+        Verified: 1
+    failure:
+      gerrit:
+        Verified: -1
+
+- pipeline:
+    name: post
+    manager: independent
+    trigger:
+      gerrit:
+        - event: ref-updated
+          ref: ^(?!refs/).*$
+
+- pipeline:
+    name: gate
+    manager: dependent
+    failure-message: Build failed.  For information on how to proceed, see http://wiki.example.org/Test_Failures
+    trigger:
+      gerrit:
+        - event: comment-added
+          approval:
+            - Approved: 1
+    success:
+      gerrit:
+        Verified: 2
+        submit: true
+    failure:
+      gerrit:
+        Verified: -2
+    start:
+      gerrit:
+        Verified: 0
+    precedence: high
+
+- job:
+    name: base
+    parent: null
+
+- job:
+    name: project-merge
+
+- job:
+    name: project-test1
+
+- job:
+    name: project-test2
+
+- job:
+    name: project-post
+
+- project:
+    name: org/new-project
+    check:
+      jobs:
+        - project-merge
+        - project-test1:
+            dependencies: project-merge
+        - project-test2:
+            dependencies: project-merge
+    gate:
+      jobs:
+        - project-merge:
+        - project-test1:
+            dependencies: project-merge
+        - project-test2:
+            dependencies: project-merge
+    post:
+      jobs:
+        - project-post
diff --git a/tests/fixtures/tenants/delayed-repo-init.yaml b/tests/fixtures/tenants/delayed-repo-init.yaml
new file mode 100644
index 0000000..433e6f7
--- /dev/null
+++ b/tests/fixtures/tenants/delayed-repo-init.yaml
@@ -0,0 +1,11 @@
+- tenant:
+    name: tenant-one
+    source:
+      gerrit:
+        config-projects:
+          - common-config
+        untrusted-projects:
+          - org/project
+          - org/project1
+          - org/project2
+          - org/new-project