Remove InitTestCase

This inherited LocalDiskRepositoryTestCase, which means it can't inherit
GerritBaseTests. (Lack of multiple inheritance is one reason why an
abstract base test class is not a great pattern to begin with, of
course.) It was doing a weird thing anyway: putting a site directory
inside the git repository created by the test case. In other words, it
was a convenient way of creating a temporary directory. In the one
actual subclass, use the more idiomatic TemporaryFolder rule instead.

Change-Id: I2b22452b53828502f82b6e522976e13e7b3227ad
diff --git a/javatests/com/google/gerrit/pgm/init/InitTestCase.java b/javatests/com/google/gerrit/pgm/init/InitTestCase.java
deleted file mode 100644
index 35c0937..0000000
--- a/javatests/com/google/gerrit/pgm/init/InitTestCase.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2009 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.pgm.init;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import org.eclipse.jgit.junit.LocalDiskRepositoryTestCase;
-import org.junit.Ignore;
-
-@Ignore
-public abstract class InitTestCase extends LocalDiskRepositoryTestCase {
-  protected Path newSitePath() throws IOException {
-    return createWorkRepository().getWorkTree().toPath().resolve("test_site");
-  }
-}
diff --git a/javatests/com/google/gerrit/pgm/init/UpgradeFrom2_0_xTest.java b/javatests/com/google/gerrit/pgm/init/UpgradeFrom2_0_xTest.java
index 4d3d6df..159ff0d 100644
--- a/javatests/com/google/gerrit/pgm/init/UpgradeFrom2_0_xTest.java
+++ b/javatests/com/google/gerrit/pgm/init/UpgradeFrom2_0_xTest.java
@@ -32,6 +32,7 @@
 import com.google.gerrit.pgm.init.api.Section;
 import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.securestore.testing.InMemorySecureStore;
+import com.google.gerrit.testing.GerritBaseTests;
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.file.Files;
@@ -40,13 +41,16 @@
 import org.eclipse.jgit.errors.ConfigInvalidException;
 import org.eclipse.jgit.storage.file.FileBasedConfig;
 import org.eclipse.jgit.util.FS;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 
-public class UpgradeFrom2_0_xTest extends InitTestCase {
+public class UpgradeFrom2_0_xTest extends GerritBaseTests {
+  @Rule public TemporaryFolder folder = new TemporaryFolder();
 
   @Test
   public void upgrade() throws IOException, ConfigInvalidException {
-    final Path p = newSitePath();
+    final Path p = folder.newFolder().toPath();
     final SitePaths site = new SitePaths(p);
     assertTrue(site.isNew);
     FileUtil.mkdirsOrDie(site.etc_dir, "Failed to create");