Move IndexVersionsTest to javatests top-level directory

Change-Id: Ibcfa6af2969b6d7e46631afa77b9ac19ce1ac207
This commit is contained in:
David Ostrovsky
2017-09-20 09:02:21 +02:00
committed by Dave Borowitz
parent daf5cce936
commit 472396c797
4 changed files with 17 additions and 20 deletions

View File

@@ -275,18 +275,6 @@ junit_tests(
],
)
junit_tests(
name = "testutil_test",
size = "small",
srcs = [
"src/test/java/com/google/gerrit/testutil/IndexVersionsTest.java",
],
visibility = ["//visibility:public"],
deps = TESTUTIL_DEPS + [
"//java/com/google/gerrit/testing:gerrit-test-util",
],
)
load("//tools/bzl:javadoc.bzl", "java_doc")
java_doc(

View File

@@ -31,9 +31,9 @@ import java.util.SortedMap;
import org.eclipse.jgit.lib.Config;
public class IndexVersions {
public static final String ALL = "all";
public static final String CURRENT = "current";
public static final String PREVIOUS = "previous";
static final String ALL = "all";
static final String CURRENT = "current";
static final String PREVIOUS = "previous";
/**
* Returns the index versions from {@link IndexVersions#get(SchemaDefinitions)} without the latest
@@ -85,8 +85,7 @@ public class IndexVersions {
}
@VisibleForTesting
public static <V> ImmutableList<Integer> get(
SchemaDefinitions<V> schemaDef, String name, String value) {
static <V> ImmutableList<Integer> get(SchemaDefinitions<V> schemaDef, String name, String value) {
if (value != null) {
value = value.trim();
}

View File

@@ -0,0 +1,12 @@
load("//tools/bzl:junit.bzl", "junit_tests")
junit_tests(
name = "testing_tests",
size = "small",
srcs = glob(["*.java"]),
deps = [
"//gerrit-server:server",
"//java/com/google/gerrit/testing:gerrit-test-util",
"//lib:truth",
],
)

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.testutil;
package com.google.gerrit.testing;
import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.TruthJUnit.assume;
@@ -21,8 +21,6 @@ import static com.google.gerrit.testing.IndexVersions.CURRENT;
import static com.google.gerrit.testing.IndexVersions.PREVIOUS;
import com.google.gerrit.server.index.change.ChangeSchemaDefinitions;
import com.google.gerrit.testing.GerritBaseTests;
import com.google.gerrit.testing.IndexVersions;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;