Merge branch 'stable-2.16'
* stable-2.16: Mark greenmail as testonly Bazel: Fix testonly values in BUILD and .bzl files ListBranchesIT: Also assert on the expected ref of refs/meta/config Consistently define default serialVersionUID Scripts: Use bash in shebang GroupsUpdate: Evict group caches on group creation Change-Id: Ide87f2555d458c93c351d48693af520a3a80b656
This commit is contained in:
2
BUILD
2
BUILD
@@ -67,7 +67,7 @@ API_DEPS = [
|
|||||||
|
|
||||||
genrule2(
|
genrule2(
|
||||||
name = "api",
|
name = "api",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = API_DEPS,
|
srcs = API_DEPS,
|
||||||
outs = ["api.zip"],
|
outs = ["api.zip"],
|
||||||
cmd = " && ".join([
|
cmd = " && ".join([
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ load("//tools/bzl:java.bzl", "java_library2")
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "lib",
|
name = "lib",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
resource_strip_prefix = "resources",
|
resource_strip_prefix = "resources",
|
||||||
resources = ["//resources/com/google/gerrit/acceptance"],
|
resources = ["//resources/com/google/gerrit/acceptance"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
@@ -57,7 +57,7 @@ java_library(
|
|||||||
|
|
||||||
java_binary(
|
java_binary(
|
||||||
name = "framework",
|
name = "framework",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
main_class = "Dummy",
|
main_class = "Dummy",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
runtime_deps = [":framework-lib"],
|
runtime_deps = [":framework-lib"],
|
||||||
@@ -65,7 +65,7 @@ java_binary(
|
|||||||
|
|
||||||
java_library2(
|
java_library2(
|
||||||
name = "framework-lib",
|
name = "framework-lib",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["**/*.java"]),
|
srcs = glob(["**/*.java"]),
|
||||||
exported_deps = [
|
exported_deps = [
|
||||||
"//java/com/google/gerrit/gpg",
|
"//java/com/google/gerrit/gpg",
|
||||||
@@ -132,7 +132,7 @@ load("//tools/bzl:javadoc.bzl", "java_doc")
|
|||||||
|
|
||||||
java_doc(
|
java_doc(
|
||||||
name = "framework-javadoc",
|
name = "framework-javadoc",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
libs = [":framework-lib"],
|
libs = [":framework-lib"],
|
||||||
pkgs = ["com.google.gerrit.acceptance"],
|
pkgs = ["com.google.gerrit.acceptance"],
|
||||||
title = "Gerrit Acceptance Test Framework Documentation",
|
title = "Gerrit Acceptance Test Framework Documentation",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "common-data-test-util",
|
name = "common-data-test-util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["**/*.java"]),
|
srcs = glob(["**/*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "common-test-util",
|
name = "common-test-util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["**/*.java"]),
|
srcs = glob(["**/*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "restapi-test-util",
|
name = "restapi-test-util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["**/*.java"]),
|
srcs = glob(["**/*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package(default_testonly = 1)
|
package(default_testonly = True)
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "gpg-test-util",
|
name = "gpg-test-util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["**/*.java"]),
|
srcs = glob(["**/*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -53,9 +53,10 @@ import org.eclipse.jgit.errors.ConfigInvalidException;
|
|||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class BecomeAnyAccountLoginServlet extends HttpServlet {
|
class BecomeAnyAccountLoginServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final DynamicItem<WebSession> webSession;
|
private final DynamicItem<WebSession> webSession;
|
||||||
private final Accounts accounts;
|
private final Accounts accounts;
|
||||||
private final AccountCache accountCache;
|
private final AccountCache accountCache;
|
||||||
|
|||||||
@@ -46,9 +46,10 @@ import org.w3c.dom.Document;
|
|||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
|
|
||||||
/** Handles username/password based authentication against the directory. */
|
/** Handles username/password based authentication against the directory. */
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class LdapLoginServlet extends HttpServlet {
|
class LdapLoginServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
||||||
private final AccountManager accountManager;
|
private final AccountManager accountManager;
|
||||||
|
|||||||
@@ -52,9 +52,10 @@ import org.w3c.dom.Document;
|
|||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
|
|
||||||
/** Handles OpenID based login flow. */
|
/** Handles OpenID based login flow. */
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class LoginForm extends HttpServlet {
|
class LoginForm extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
||||||
private static final ImmutableMap<String, String> ALL_PROVIDERS =
|
private static final ImmutableMap<String, String> ALL_PROVIDERS =
|
||||||
|
|||||||
@@ -23,9 +23,10 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/** Handles the {@code /OpenID} URL for web based single-sign-on. */
|
/** Handles the {@code /OpenID} URL for web based single-sign-on. */
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class OpenIdLoginServlet extends HttpServlet {
|
class OpenIdLoginServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final OpenIdServiceImpl impl;
|
private final OpenIdServiceImpl impl;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
@@ -32,9 +32,10 @@ import javax.servlet.http.HttpServlet;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class GitLogoServlet extends HttpServlet {
|
class GitLogoServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final long modified;
|
private final long modified;
|
||||||
private final byte[] raw;
|
private final byte[] raw;
|
||||||
|
|
||||||
|
|||||||
@@ -32,10 +32,13 @@ import javax.servlet.http.HttpServlet;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
abstract class GitwebCssServlet extends HttpServlet {
|
abstract class GitwebCssServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
static class Site extends GitwebCssServlet {
|
static class Site extends GitwebCssServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
Site(SitePaths paths) throws IOException {
|
Site(SitePaths paths) throws IOException {
|
||||||
super(paths.site_css);
|
super(paths.site_css);
|
||||||
@@ -44,6 +47,8 @@ abstract class GitwebCssServlet extends HttpServlet {
|
|||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
static class Default extends GitwebCssServlet {
|
static class Default extends GitwebCssServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
Default(GitwebCgiConfig gwcc) throws IOException {
|
Default(GitwebCgiConfig gwcc) throws IOException {
|
||||||
super(gwcc.getGitwebCss());
|
super(gwcc.getGitwebCss());
|
||||||
|
|||||||
@@ -32,9 +32,10 @@ import javax.servlet.http.HttpServlet;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class GitwebJavaScriptServlet extends HttpServlet {
|
class GitwebJavaScriptServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final long modified;
|
private final long modified;
|
||||||
private final byte[] raw;
|
private final byte[] raw;
|
||||||
|
|
||||||
|
|||||||
@@ -89,9 +89,10 @@ import org.eclipse.jgit.lib.Config;
|
|||||||
import org.eclipse.jgit.lib.Repository;
|
import org.eclipse.jgit.lib.Repository;
|
||||||
|
|
||||||
/** Invokes {@code gitweb.cgi} for the project given in {@code p}. */
|
/** Invokes {@code gitweb.cgi} for the project given in {@code p}. */
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
class GitwebServlet extends HttpServlet {
|
class GitwebServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||||
|
|
||||||
private static final String PROJECT_LIST_ACTION = "project_list";
|
private static final String PROJECT_LIST_ACTION = "project_list";
|
||||||
|
|||||||
@@ -47,9 +47,10 @@ import org.eclipse.jgit.lib.ObjectId;
|
|||||||
* this site, and will execute it with the site's own protection domain. This opens a massive
|
* this site, and will execute it with the site's own protection domain. This opens a massive
|
||||||
* security hole so we package the content into a zip file.
|
* security hole so we package the content into a zip file.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class CatServlet extends HttpServlet {
|
public class CatServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final ChangeEditUtil changeEditUtil;
|
private final ChangeEditUtil changeEditUtil;
|
||||||
private final PatchSetUtil psUtil;
|
private final PatchSetUtil psUtil;
|
||||||
private final ChangeNotes.Factory changeNotesFactory;
|
private final ChangeNotes.Factory changeNotesFactory;
|
||||||
|
|||||||
@@ -34,9 +34,10 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
* as it would lose any history token that appears in the URL. Instead we send an HTML page which
|
* as it would lose any history token that appears in the URL. Instead we send an HTML page which
|
||||||
* instructs the browser to replace the URL, but preserve the history token.
|
* instructs the browser to replace the URL, but preserve the history token.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class LegacyGerritServlet extends HttpServlet {
|
public class LegacyGerritServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final byte[] raw;
|
private final byte[] raw;
|
||||||
private final byte[] compressed;
|
private final byte[] compressed;
|
||||||
|
|
||||||
|
|||||||
@@ -46,9 +46,10 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
* Port 8010
|
* Port 8010
|
||||||
* }</pre>
|
* }</pre>
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@Singleton
|
@Singleton
|
||||||
public class SshInfoServlet extends HttpServlet {
|
public class SshInfoServlet extends HttpServlet {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private final SshInfo sshd;
|
private final SshInfo sshd;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
|||||||
@@ -1554,8 +1554,9 @@ public class RestApiServlet extends HttpServlet {
|
|||||||
return new TemporaryBuffer.Heap(est, max);
|
return new TemporaryBuffer.Heap(est, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
private static class AmbiguousViewException extends Exception {
|
private static class AmbiguousViewException extends Exception {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
AmbiguousViewException(String message) {
|
AmbiguousViewException(String message) {
|
||||||
super(message);
|
super(message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package(default_testonly = 1)
|
package(default_testonly = True)
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
|
|||||||
@@ -50,4 +50,6 @@ public abstract class AccountDirectory {
|
|||||||
|
|
||||||
public abstract void fillAccountInfo(Iterable<? extends AccountInfo> in, Set<FillOptions> options)
|
public abstract void fillAccountInfo(Iterable<? extends AccountInfo> in, Set<FillOptions> options)
|
||||||
throws PermissionBackendException;
|
throws PermissionBackendException;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package(default_testonly = 1)
|
package(default_testonly = True)
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ package com.google.gerrit.server.config;
|
|||||||
import com.google.gerrit.reviewdb.client.Project;
|
import com.google.gerrit.reviewdb.client.Project;
|
||||||
|
|
||||||
/** Special name of the project that all projects derive from. */
|
/** Special name of the project that all projects derive from. */
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public class AllProjectsName extends Project.NameKey {
|
public class AllProjectsName extends Project.NameKey {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public AllProjectsName(String name) {
|
public AllProjectsName(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ package com.google.gerrit.server.config;
|
|||||||
import com.google.gerrit.reviewdb.client.Project;
|
import com.google.gerrit.reviewdb.client.Project;
|
||||||
|
|
||||||
/** Special name of the project in which meta data for all users is stored. */
|
/** Special name of the project in which meta data for all users is stored. */
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public class AllUsersName extends Project.NameKey {
|
public class AllUsersName extends Project.NameKey {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public AllUsersName(String name) {
|
public AllUsersName(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,8 +129,9 @@ public class QueryDocumentationExecutor {
|
|||||||
return parser != null && searcher != null;
|
return parser != null && searcher != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
public static class DocQueryException extends Exception {
|
public static class DocQueryException extends Exception {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
DocQueryException() {}
|
DocQueryException() {}
|
||||||
|
|
||||||
DocQueryException(String msg) {
|
DocQueryException(String msg) {
|
||||||
|
|||||||
@@ -345,6 +345,9 @@ public class GroupsUpdate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateCachesOnGroupCreation(InternalGroup createdGroup) throws IOException {
|
private void updateCachesOnGroupCreation(InternalGroup createdGroup) throws IOException {
|
||||||
|
groupCache.evict(createdGroup.getGroupUUID());
|
||||||
|
groupCache.evict(createdGroup.getId());
|
||||||
|
groupCache.evict(createdGroup.getNameKey());
|
||||||
indexer.get().index(createdGroup.getGroupUUID());
|
indexer.get().index(createdGroup.getGroupUUID());
|
||||||
createdGroup.getMembers().forEach(groupIncludeCache::evictGroupsWithMember);
|
createdGroup.getMembers().forEach(groupIncludeCache::evictGroupsWithMember);
|
||||||
createdGroup.getSubgroups().forEach(groupIncludeCache::evictParentGroupsOf);
|
createdGroup.getSubgroups().forEach(groupIncludeCache::evictParentGroupsOf);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["*.java"]),
|
srcs = glob(["*.java"]),
|
||||||
deps = [
|
deps = [
|
||||||
"//java/com/google/gerrit/common:server",
|
"//java/com/google/gerrit/common:server",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package(default_visibility = ["//visibility:public"])
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["*.java"]),
|
srcs = glob(["*.java"]),
|
||||||
deps = [
|
deps = [
|
||||||
"//java/com/google/gerrit/common:server",
|
"//java/com/google/gerrit/common:server",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "project-test-util",
|
name = "project-test-util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["*.java"]),
|
srcs = glob(["*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package(default_testonly = 1)
|
package(default_testonly = True)
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "testing",
|
name = "testing",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "gerrit-test-util",
|
name = "gerrit-test-util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["**/*.java"]),
|
srcs = glob(["**/*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
exports = [
|
exports = [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "truth",
|
name = "truth",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["**/*.java"]),
|
srcs = glob(["**/*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ package com.google.gerrit.acceptance.api.group;
|
|||||||
|
|
||||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
import static com.google.common.truth.Truth8.assertThat;
|
||||||
import static com.google.gerrit.acceptance.GitUtil.deleteRef;
|
import static com.google.gerrit.acceptance.GitUtil.deleteRef;
|
||||||
import static com.google.gerrit.acceptance.GitUtil.fetch;
|
import static com.google.gerrit.acceptance.GitUtil.fetch;
|
||||||
import static com.google.gerrit.acceptance.api.group.GroupAssert.assertGroupInfo;
|
import static com.google.gerrit.acceptance.api.group.GroupAssert.assertGroupInfo;
|
||||||
@@ -206,6 +207,15 @@ public class GroupsIT extends AbstractDaemonTest {
|
|||||||
assertThat(groupsWithMemberAfterRemoval).doesNotContain(groupUuid);
|
assertThat(groupsWithMemberAfterRemoval).doesNotContain(groupUuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void cachedGroupByNameIsUpdatedOnCreation() throws Exception {
|
||||||
|
String newGroupName = name("newGroup");
|
||||||
|
AccountGroup.NameKey nameKey = new AccountGroup.NameKey(newGroupName);
|
||||||
|
assertThat(groupCache.get(nameKey)).isEmpty();
|
||||||
|
gApi.groups().create(newGroupName);
|
||||||
|
assertThat(groupCache.get(nameKey)).isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void addExistingMember_OK() throws Exception {
|
public void addExistingMember_OK() throws Exception {
|
||||||
String g = "Administrators";
|
String g = "Administrators";
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ acceptance_tests(
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "push_for_review",
|
name = "push_for_review",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = ["AbstractPushForReview.java"],
|
srcs = ["AbstractPushForReview.java"],
|
||||||
deps = [
|
deps = [
|
||||||
"//java/com/google/gerrit/acceptance:lib",
|
"//java/com/google/gerrit/acceptance:lib",
|
||||||
@@ -23,7 +23,7 @@ java_library(
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "submodule_util",
|
name = "submodule_util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = ["AbstractSubmoduleSubscription.java"],
|
srcs = ["AbstractSubmoduleSubscription.java"],
|
||||||
deps = ["//java/com/google/gerrit/acceptance:lib"],
|
deps = ["//java/com/google/gerrit/acceptance:lib"],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ acceptance_tests(
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "util",
|
name = "util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = [
|
srcs = [
|
||||||
"AbstractReindexTests.java",
|
"AbstractReindexTests.java",
|
||||||
"IndexUpgradeController.java",
|
"IndexUpgradeController.java",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ acceptance_tests(
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "util",
|
name = "util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = [
|
srcs = [
|
||||||
"AccountAssert.java",
|
"AccountAssert.java",
|
||||||
"CapabilityInfo.java",
|
"CapabilityInfo.java",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ acceptance_tests(
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "submit_util",
|
name = "submit_util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = SUBMIT_UTIL_SRCS,
|
srcs = SUBMIT_UTIL_SRCS,
|
||||||
deps = [
|
deps = [
|
||||||
"//java/com/google/gerrit/acceptance:lib",
|
"//java/com/google/gerrit/acceptance:lib",
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ java_library(
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "push_tag_util",
|
name = "push_tag_util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = [
|
srcs = [
|
||||||
"AbstractPushTag.java",
|
"AbstractPushTag.java",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -55,10 +55,11 @@ public class ListBranchesIT extends AbstractDaemonTest {
|
|||||||
public void listBranches() throws Exception {
|
public void listBranches() throws Exception {
|
||||||
String master = pushTo("refs/heads/master").getCommit().name();
|
String master = pushTo("refs/heads/master").getCommit().name();
|
||||||
String dev = pushTo("refs/heads/dev").getCommit().name();
|
String dev = pushTo("refs/heads/dev").getCommit().name();
|
||||||
|
String refsConfig = getRemoteHead(project, RefNames.REFS_CONFIG).name();
|
||||||
assertRefs(
|
assertRefs(
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
branch("HEAD", "master", false),
|
branch("HEAD", "master", false),
|
||||||
branch(RefNames.REFS_CONFIG, null, false),
|
branch(RefNames.REFS_CONFIG, refsConfig, false),
|
||||||
branch("refs/heads/dev", dev, true),
|
branch("refs/heads/dev", dev, true),
|
||||||
branch("refs/heads/master", master, false)),
|
branch("refs/heads/master", master, false)),
|
||||||
list().get());
|
list().get());
|
||||||
@@ -90,7 +91,8 @@ public class ListBranchesIT extends AbstractDaemonTest {
|
|||||||
@Test
|
@Test
|
||||||
public void listBranchesUsingPagination() throws Exception {
|
public void listBranchesUsingPagination() throws Exception {
|
||||||
BranchInfo head = branch("HEAD", "master", false);
|
BranchInfo head = branch("HEAD", "master", false);
|
||||||
BranchInfo refsConfig = branch(RefNames.REFS_CONFIG, null, false);
|
BranchInfo refsConfig =
|
||||||
|
branch(RefNames.REFS_CONFIG, getRemoteHead(project, RefNames.REFS_CONFIG).name(), false);
|
||||||
BranchInfo master =
|
BranchInfo master =
|
||||||
branch("refs/heads/master", pushTo("refs/heads/master").getCommit().getName(), false);
|
branch("refs/heads/master", pushTo("refs/heads/master").getCommit().getName(), false);
|
||||||
BranchInfo branch1 =
|
BranchInfo branch1 =
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "util",
|
name = "util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["*.java"]),
|
srcs = glob(["*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ acceptance_tests(
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "util",
|
name = "util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = ["AbstractMailIT.java"],
|
srcs = ["AbstractMailIT.java"],
|
||||||
deps = DEPS + ["//java/com/google/gerrit/acceptance:lib"],
|
deps = DEPS + ["//java/com/google/gerrit/acceptance:lib"],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ load("//javatests/com/google/gerrit/acceptance:tests.bzl", "acceptance_tests")
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "util",
|
name = "util",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = ["AbstractIndexTests.java"],
|
srcs = ["AbstractIndexTests.java"],
|
||||||
deps = ["//java/com/google/gerrit/acceptance:lib"],
|
deps = ["//java/com/google/gerrit/acceptance:lib"],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ load("//tools/bzl:junit.bzl", "junit_tests")
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "elasticsearch_test_utils",
|
name = "elasticsearch_test_utils",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = [
|
srcs = [
|
||||||
"ElasticContainer.java",
|
"ElasticContainer.java",
|
||||||
"ElasticTestUtils.java",
|
"ElasticTestUtils.java",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ CUSTOM_TRUTH_SUBJECTS = glob([
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "custom-truth-subjects",
|
name = "custom-truth-subjects",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = CUSTOM_TRUTH_SUBJECTS,
|
srcs = CUSTOM_TRUTH_SUBJECTS,
|
||||||
deps = [
|
deps = [
|
||||||
"//java/com/google/gerrit/extensions:api",
|
"//java/com/google/gerrit/extensions:api",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ ABSTRACT_QUERY_TEST = ["AbstractQueryAccountsTest.java"]
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "abstract_query_tests",
|
name = "abstract_query_tests",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = ABSTRACT_QUERY_TEST,
|
srcs = ABSTRACT_QUERY_TEST,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ ABSTRACT_QUERY_TEST = ["AbstractQueryChangesTest.java"]
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "abstract_query_tests",
|
name = "abstract_query_tests",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = ABSTRACT_QUERY_TEST,
|
srcs = ABSTRACT_QUERY_TEST,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
runtime_deps = ["//prolog:gerrit-prolog-common"],
|
runtime_deps = ["//prolog:gerrit-prolog-common"],
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ ABSTRACT_QUERY_TEST = ["AbstractQueryGroupsTest.java"]
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "abstract_query_tests",
|
name = "abstract_query_tests",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = ABSTRACT_QUERY_TEST,
|
srcs = ABSTRACT_QUERY_TEST,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ ABSTRACT_QUERY_TEST = ["AbstractQueryProjectsTest.java"]
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "abstract_query_tests",
|
name = "abstract_query_tests",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = ABSTRACT_QUERY_TEST,
|
srcs = ABSTRACT_QUERY_TEST,
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "testutil",
|
name = "testutil",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
srcs = glob(["**/*.java"]),
|
srcs = glob(["**/*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ POST_JDK8_DEPS = [":javax-activation"]
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "javax-activation",
|
name = "javax-activation",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
data = ["//lib:LICENSE-DO_NOT_DISTRIBUTE"],
|
data = ["//lib:LICENSE-DO_NOT_DISTRIBUTE"],
|
||||||
exports = ["@javax-activation//jar"],
|
exports = ["@javax-activation//jar"],
|
||||||
)
|
)
|
||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "greenmail",
|
name = "greenmail",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
data = ["//lib:LICENSE-Apache2.0"],
|
data = ["//lib:LICENSE-Apache2.0"],
|
||||||
exports = ["@greenmail//jar"],
|
exports = ["@greenmail//jar"],
|
||||||
runtime_deps = select({
|
runtime_deps = select({
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ load("//lib/jgit:jgit.bzl", "jgit_dep")
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "junit",
|
name = "junit",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
data = ["//lib:LICENSE-DO_NOT_DISTRIBUTE"],
|
data = ["//lib:LICENSE-DO_NOT_DISTRIBUTE"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
exports = [jgit_dep("@jgit-junit//jar")],
|
exports = [jgit_dep("@jgit-junit//jar")],
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
package(
|
package(
|
||||||
default_testonly = 1,
|
default_testonly = True,
|
||||||
default_visibility = ["//visibility:private"],
|
default_visibility = ["//visibility:private"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ java_library(
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "testcontainers-elasticsearch",
|
name = "testcontainers-elasticsearch",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
data = ["//lib:LICENSE-testcontainers"],
|
data = ["//lib:LICENSE-testcontainers"],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
exports = ["@testcontainers-elasticsearch//jar"],
|
exports = ["@testcontainers-elasticsearch//jar"],
|
||||||
|
|||||||
Submodule plugins/replication updated: 52ab8f8eee...8eb376d306
@@ -23,7 +23,7 @@ polygerrit_bundle(
|
|||||||
|
|
||||||
bower_component_bundle(
|
bower_component_bundle(
|
||||||
name = "test_components",
|
name = "test_components",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
deps = [
|
deps = [
|
||||||
"//lib/js:iron-test-helpers",
|
"//lib/js:iron-test-helpers",
|
||||||
"//lib/js:test-fixture",
|
"//lib/js:test-fixture",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Usage
|
# Usage
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ DEPS = [
|
|||||||
|
|
||||||
java_library(
|
java_library(
|
||||||
name = "classpath",
|
name = "classpath",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
runtime_deps = LIBS + PGMLIBS + DEPS,
|
runtime_deps = LIBS + PGMLIBS + DEPS,
|
||||||
)
|
)
|
||||||
|
|
||||||
classpath_collector(
|
classpath_collector(
|
||||||
name = "main_classpath_collect",
|
name = "main_classpath_collect",
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
deps = LIBS + PGMLIBS + DEPS + TEST_DEPS +
|
deps = LIBS + PGMLIBS + DEPS + TEST_DEPS +
|
||||||
["//plugins/%s:%s__plugin" % (n, n) for n in CORE_PLUGINS + CUSTOM_PLUGINS] +
|
["//plugins/%s:%s__plugin" % (n, n) for n in CORE_PLUGINS + CUSTOM_PLUGINS] +
|
||||||
["//plugins/%s:%s__plugin_test_deps" % (n, n) for n in CUSTOM_PLUGINS_TEST_DEPS],
|
["//plugins/%s:%s__plugin_test_deps" % (n, n) for n in CUSTOM_PLUGINS_TEST_DEPS],
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ def maven_package(
|
|||||||
srcs = api_targets,
|
srcs = api_targets,
|
||||||
outs = ["api_install.sh"],
|
outs = ["api_install.sh"],
|
||||||
executable = True,
|
executable = True,
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
if repository and url:
|
if repository and url:
|
||||||
@@ -70,7 +70,7 @@ def maven_package(
|
|||||||
srcs = api_targets,
|
srcs = api_targets,
|
||||||
outs = ["api_deploy.sh"],
|
outs = ["api_deploy.sh"],
|
||||||
executable = True,
|
executable = True,
|
||||||
testonly = 1,
|
testonly = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
war_cmd = mvn_cmd[:]
|
war_cmd = mvn_cmd[:]
|
||||||
|
|||||||
Reference in New Issue
Block a user