Re-enable test_crd_check job

This one was a little tricky, we needed to add
hold_jobs_in_build = True to the test so we can access the jobdir.
This is so we can get access to the git repos, each job creates now.

Change-Id: I53c2f6fec8d9d04aa11a8cc13ec5f89a28e4997c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index dc5371c..fd95c08 100755
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -4103,10 +4103,10 @@
         self.assertEqual(B.data['status'], 'MERGED')
         self.assertEqual(B.reported, 0)
 
-    @skip("Disabled for early v3 development")
     def test_crd_check(self):
         "Test cross-repo dependencies in independent pipelines"
 
+        self.launch_server.hold_jobs_in_build = True
         self.gearman_server.hold_jobs_in_queue = True
         A = self.fake_gerrit.addFakeChange('org/project1', 'master', 'A')
         B = self.fake_gerrit.addFakeChange('org/project2', 'master', 'B')
@@ -4124,27 +4124,37 @@
         self.gearman_server.release()
         self.waitUntilSettled()
 
-        path = os.path.join(self.git_root, "org/project1")
+        self.launch_server.release('.*-merge')
+        self.waitUntilSettled()
+
+        path = os.path.join(self.builds[0].jobdir.git_root, "org/project1")
         repo = git.Repo(path)
         repo_messages = [c.message.strip() for c in repo.iter_commits(ref)]
         repo_messages.reverse()
-        correct_messages = ['initial commit', 'A-1']
+        correct_messages = [
+            'initial commit', 'add content from fixture', 'A-1']
         self.assertEqual(repo_messages, correct_messages)
 
-        path = os.path.join(self.git_root, "org/project2")
+        path = os.path.join(self.builds[0].jobdir.git_root, "org/project2")
         repo = git.Repo(path)
         repo_messages = [c.message.strip() for c in repo.iter_commits(ref)]
         repo_messages.reverse()
-        correct_messages = ['initial commit', 'B-1']
+        correct_messages = [
+            'initial commit', 'add content from fixture', 'B-1']
         self.assertEqual(repo_messages, correct_messages)
 
+        self.launch_server.hold_jobs_in_build = False
+        self.launch_server.release()
+        self.waitUntilSettled()
+
         self.assertEqual(A.data['status'], 'NEW')
         self.assertEqual(B.data['status'], 'NEW')
         self.assertEqual(A.reported, 1)
         self.assertEqual(B.reported, 0)
 
         self.assertEqual(self.history[0].changes, '2,1 1,1')
-        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)
 
     def test_crd_check_git_depends(self):
         "Test single-repo dependencies in independent pipelines"