Merge branch 'stable-2.16' into stable-3.0
* stable-2.16:
Upgrade bazlets to latest stable-2.16 to build with 2.16.26 API
Upgrade bazlets to latest stable-2.16 to build with 2.16.23 API
Change-Id: Icf698ec0a6c5097c40a1ef7706eb9e2a01b16926
diff --git a/.bazelversion b/.bazelversion
index fd2a018..7c69a55 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1 +1 @@
-3.1.0
+3.7.0
diff --git a/BUILD b/BUILD
index a0e371e..afc2580 100644
--- a/BUILD
+++ b/BUILD
@@ -36,6 +36,5 @@
visibility = ["//visibility:public"],
exports = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [
":go-import__plugin",
- "@mockito//jar",
],
)
diff --git a/WORKSPACE b/WORKSPACE
index 4eaa157..599e533 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,28 +3,13 @@
load("//:bazlets.bzl", "load_bazlets")
load_bazlets(
- commit = "6c39deb06f58bb62162ccb6865964f531739f512",
+ commit = "a010a539824bd467059f414412a47b80101352d7",
#local_path = "/home/<user>/projects/bazlets",
)
-# Snapshot Plugin API
-#load(
-# "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
-# "gerrit_api_maven_local",
-#)
-
-# Load snapshot Plugin API
-#gerrit_api_maven_local()
-
-# Release Plugin API
load(
"@com_googlesource_gerrit_bazlets//:gerrit_api.bzl",
"gerrit_api",
)
-# Load release Plugin API
gerrit_api()
-
-load("//:external_plugin_deps.bzl", "external_plugin_deps")
-
-external_plugin_deps()
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl
deleted file mode 100644
index c1932a9..0000000
--- a/external_plugin_deps.bzl
+++ /dev/null
@@ -1,33 +0,0 @@
-load("//tools/bzl:maven_jar.bzl", "maven_jar")
-
-def external_plugin_deps():
- maven_jar(
- name = "mockito",
- artifact = "org.mockito:mockito-core:2.28.2",
- sha1 = "91110215a8cb9b77a46e045ee758f77d79167cc0",
- deps = [
- "@byte-buddy//jar",
- "@byte-buddy-agent//jar",
- "@objenesis//jar",
- ],
- )
-
- BYTE_BUDDY_VERSION = "1.9.10"
-
- maven_jar(
- name = "byte-buddy",
- artifact = "net.bytebuddy:byte-buddy:" + BYTE_BUDDY_VERSION,
- sha1 = "211a2b4d3df1eeef2a6cacf78d74a1f725e7a840",
- )
-
- maven_jar(
- name = "byte-buddy-agent",
- artifact = "net.bytebuddy:byte-buddy-agent:" + BYTE_BUDDY_VERSION,
- sha1 = "9674aba5ee793e54b864952b001166848da0f26b",
- )
-
- maven_jar(
- name = "objenesis",
- artifact = "org.objenesis:objenesis:2.6",
- sha1 = "639033469776fd37c08358c6b92a4761feb2af4b",
- )
diff --git a/src/main/resources/Documentation/about.md b/src/main/resources/Documentation/about.md
index d2b86eb..35cfe61 100644
--- a/src/main/resources/Documentation/about.md
+++ b/src/main/resources/Documentation/about.md
@@ -47,3 +47,9 @@
| `/bob/my-project/package1` | `bob/my-project` |
| `/bob/my-project/package1/folder2` | `bob/my-project` |
+### Access (Anonymous vs. Authenticated URLs)
+The exact git clone URL served to the client go command will depend on the
+project's configured ACLs. If the project is configured to allow anonymous
+read access to `refs/heads/*`, an anonymous URL will be served (e.g.
+`https://gerrit.example/bob/my-project`). Otherwise, a URL that requires
+authentication will be used (e.g. `https://gerrit.example/a/bob/my-project`).
diff --git a/src/test/java/com/ericsson/gerrit/plugins/goimport/GoImportFilterTest.java b/src/test/java/com/ericsson/gerrit/plugins/goimport/GoImportFilterTest.java
index 8eed5a0..0939935 100644
--- a/src/test/java/com/ericsson/gerrit/plugins/goimport/GoImportFilterTest.java
+++ b/src/test/java/com/ericsson/gerrit/plugins/goimport/GoImportFilterTest.java
@@ -175,7 +175,6 @@
verify(mockChain, times(0)).doFilter(mockRequest, mockResponse);
verify(mockProjectCache, times(3)).get(any(Project.NameKey.class));
verify(mockResponse, times(1)).setStatus(200);
- verify(mockPermsForRef, times(1)).testOrFalse(RefPermission.READ);
}
@Test