Move IndexVersionsTest to javatests top-level directory
Change-Id: Ibcfa6af2969b6d7e46631afa77b9ac19ce1ac207
This commit is contained in:
committed by
Dave Borowitz
parent
daf5cce936
commit
472396c797
@@ -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(
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
12
javatests/com/google/gerrit/testing/BUILD
Normal file
12
javatests/com/google/gerrit/testing/BUILD
Normal 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",
|
||||
],
|
||||
)
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user