Fix ExternalId.create API usage Change I73ddea272ae57dd2fef deprecates passwords in external Ids and updates the create API to not take passwords anymore. Also, fix docker-tests to run against in-tree war so that runtime APIs match what we compiled against. As a result of this change, the bazel test docker-tests target now only works with an in-tree build Change-Id: Ie1c0be443bcda7892d4407fd65d558e1f3cf3845
diff --git a/BUILD b/BUILD index 0fb030b..96f7503 100644 --- a/BUILD +++ b/BUILD
@@ -34,10 +34,10 @@ size = "medium", srcs = ["test/docker/run.sh"], args = [ - "--remote-gerrit-account-cache-jar", - "$(location :remote-gerrit-account-cache)", + "--gerrit-war", "$(location //:gerrit.war)", + "--remote-gerrit-account-cache-jar", "$(location :remote-gerrit-account-cache)", ], - data = [plugin_name] + glob(["test/**"]), + data = ["//:gerrit.war", plugin_name] + glob(["test/**"]), local = True, tags = ["docker"], )
diff --git a/src/main/java/com/googlesource/gerrit/plugins/remotegerritaccountcache/AccountCacheImpl.java b/src/main/java/com/googlesource/gerrit/plugins/remotegerritaccountcache/AccountCacheImpl.java index 42de925..da4d57b 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/remotegerritaccountcache/AccountCacheImpl.java +++ b/src/main/java/com/googlesource/gerrit/plugins/remotegerritaccountcache/AccountCacheImpl.java
@@ -384,11 +384,7 @@ .map( i -> ExternalId.create( - externalIdKeyFactory.parse(i.identity), - accountId, - i.emailAddress, - null, - null)) + externalIdKeyFactory.parse(i.identity), accountId, i.emailAddress, null)) .collect(Collectors.toList()); } logger.atSevere().log( @@ -477,7 +473,6 @@ externalIdKeyFactory.parse(properties.get(KEY_EXTERNAL_ID)), accountId, properties.get(KEY_EMAIL), - null, null); } }