diff --git a/core/gradle/dependency-locks/testCompile.lockfile b/core/gradle/dependency-locks/testCompile.lockfile index fbbece5be..1ceb6c09e 100644 --- a/core/gradle/dependency-locks/testCompile.lockfile +++ b/core/gradle/dependency-locks/testCompile.lockfile @@ -28,7 +28,7 @@ com.google.api-client:google-api-client-appengine:1.31.3 com.google.api-client:google-api-client-jackson2:1.30.10 com.google.api-client:google-api-client-java6:1.31.3 com.google.api-client:google-api-client-servlet:1.31.3 -com.google.api-client:google-api-client:1.31.5 +com.google.api-client:google-api-client:1.32.1 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:1.5.5 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.105.5 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.105.5 @@ -56,10 +56,10 @@ com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:2.0.2 com.google.api.grpc:proto-google-cloud-spanner-v1:2.0.2 com.google.api.grpc:proto-google-common-protos:2.3.2 com.google.api.grpc:proto-google-iam-v1:1.0.14 -com.google.api:api-common:1.10.3 +com.google.api:api-common:1.10.4 com.google.api:gax-grpc:1.62.0 -com.google.api:gax-httpjson:0.81.0 -com.google.api:gax:1.65.0 +com.google.api:gax-httpjson:0.83.0 +com.google.api:gax:1.66.0 com.google.apis:google-api-services-admin-directory:directory_v1-rev118-1.25.0 com.google.apis:google-api-services-appengine:v1-rev130-1.25.0 com.google.apis:google-api-services-bigquery:v2-rev20200916-1.30.10 @@ -76,7 +76,7 @@ com.google.apis:google-api-services-monitoring:v3-rev540-1.25.0 com.google.apis:google-api-services-pubsub:v1-rev20200713-1.30.10 com.google.apis:google-api-services-sheets:v4-rev612-1.25.0 com.google.apis:google-api-services-sqladmin:v1beta4-rev20210119-1.31.0 -com.google.apis:google-api-services-storage:v1-rev20210127-1.31.0 +com.google.apis:google-api-services-storage:v1-rev20210127-1.32.1 com.google.appengine.tools:appengine-gcs-client:0.8.1 com.google.appengine.tools:appengine-mapreduce:0.9 com.google.appengine.tools:appengine-pipeline:0.2.13 @@ -98,16 +98,16 @@ com.google.cloud:google-cloud-bigquery:1.122.2 com.google.cloud:google-cloud-bigquerystorage:1.5.5 com.google.cloud:google-cloud-bigtable:1.14.0 com.google.cloud:google-cloud-core-grpc:1.93.9 -com.google.cloud:google-cloud-core-http:1.94.8 -com.google.cloud:google-cloud-core:1.95.0 -com.google.cloud:google-cloud-nio:0.123.2 +com.google.cloud:google-cloud-core-http:1.95.4 +com.google.cloud:google-cloud-core:1.95.4 +com.google.cloud:google-cloud-nio:0.123.4 com.google.cloud:google-cloud-pubsub:1.110.0 com.google.cloud:google-cloud-pubsublite:0.7.0 com.google.cloud:google-cloud-secretmanager:1.4.0 com.google.cloud:google-cloud-spanner:2.0.2 -com.google.cloud:google-cloud-storage:1.115.0 +com.google.cloud:google-cloud-storage:1.118.0 com.google.code.findbugs:jsr305:3.0.2 -com.google.code.gson:gson:2.8.6 +com.google.code.gson:gson:2.8.7 com.google.common.html.types:types:1.0.6 com.google.dagger:dagger:2.33 com.google.errorprone:error_prone_annotations:2.7.1 @@ -138,8 +138,8 @@ com.google.oauth-client:google-oauth-client-java6:1.31.4 com.google.oauth-client:google-oauth-client-jetty:1.31.4 com.google.oauth-client:google-oauth-client-servlet:1.31.4 com.google.oauth-client:google-oauth-client:1.31.5 -com.google.protobuf:protobuf-java-util:3.17.2 -com.google.protobuf:protobuf-java:3.17.2 +com.google.protobuf:protobuf-java-util:3.17.3 +com.google.protobuf:protobuf-java:3.17.3 com.google.re2j:re2j:1.6 com.google.template:soy:2021-02-01 com.google.truth.extensions:truth-java8-extension:1.1.2 @@ -163,7 +163,7 @@ io.github.classgraph:classgraph:4.8.102 io.grpc:grpc-alts:1.36.0 io.grpc:grpc-api:1.36.0 io.grpc:grpc-auth:1.36.0 -io.grpc:grpc-context:1.37.1 +io.grpc:grpc-context:1.39.0 io.grpc:grpc-core:1.36.0 io.grpc:grpc-grpclb:1.36.0 io.grpc:grpc-netty-shaded:1.36.0 diff --git a/core/gradle/dependency-locks/testCompileClasspath.lockfile b/core/gradle/dependency-locks/testCompileClasspath.lockfile index 270390b42..b008c5395 100644 --- a/core/gradle/dependency-locks/testCompileClasspath.lockfile +++ b/core/gradle/dependency-locks/testCompileClasspath.lockfile @@ -27,7 +27,7 @@ com.google.api-client:google-api-client-appengine:1.31.3 com.google.api-client:google-api-client-jackson2:1.30.10 com.google.api-client:google-api-client-java6:1.31.3 com.google.api-client:google-api-client-servlet:1.31.3 -com.google.api-client:google-api-client:1.31.5 +com.google.api-client:google-api-client:1.32.1 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:1.5.5 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.105.5 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.105.5 @@ -55,10 +55,10 @@ com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:2.0.2 com.google.api.grpc:proto-google-cloud-spanner-v1:2.0.2 com.google.api.grpc:proto-google-common-protos:2.3.2 com.google.api.grpc:proto-google-iam-v1:1.0.14 -com.google.api:api-common:1.10.3 +com.google.api:api-common:1.10.4 com.google.api:gax-grpc:1.62.0 -com.google.api:gax-httpjson:0.81.0 -com.google.api:gax:1.65.0 +com.google.api:gax-httpjson:0.83.0 +com.google.api:gax:1.66.0 com.google.apis:google-api-services-admin-directory:directory_v1-rev118-1.25.0 com.google.apis:google-api-services-appengine:v1-rev130-1.25.0 com.google.apis:google-api-services-bigquery:v2-rev20200916-1.30.10 @@ -75,7 +75,7 @@ com.google.apis:google-api-services-monitoring:v3-rev540-1.25.0 com.google.apis:google-api-services-pubsub:v1-rev20200713-1.30.10 com.google.apis:google-api-services-sheets:v4-rev612-1.25.0 com.google.apis:google-api-services-sqladmin:v1beta4-rev20210119-1.31.0 -com.google.apis:google-api-services-storage:v1-rev20210127-1.31.0 +com.google.apis:google-api-services-storage:v1-rev20210127-1.32.1 com.google.appengine.tools:appengine-gcs-client:0.8.1 com.google.appengine.tools:appengine-mapreduce:0.9 com.google.appengine.tools:appengine-pipeline:0.2.13 @@ -97,16 +97,16 @@ com.google.cloud:google-cloud-bigquery:1.122.2 com.google.cloud:google-cloud-bigquerystorage:1.5.5 com.google.cloud:google-cloud-bigtable:1.14.0 com.google.cloud:google-cloud-core-grpc:1.93.9 -com.google.cloud:google-cloud-core-http:1.94.8 -com.google.cloud:google-cloud-core:1.95.0 -com.google.cloud:google-cloud-nio:0.123.2 +com.google.cloud:google-cloud-core-http:1.95.4 +com.google.cloud:google-cloud-core:1.95.4 +com.google.cloud:google-cloud-nio:0.123.4 com.google.cloud:google-cloud-pubsub:1.110.0 com.google.cloud:google-cloud-pubsublite:0.7.0 com.google.cloud:google-cloud-secretmanager:1.4.0 com.google.cloud:google-cloud-spanner:2.0.2 -com.google.cloud:google-cloud-storage:1.115.0 +com.google.cloud:google-cloud-storage:1.118.0 com.google.code.findbugs:jsr305:3.0.2 -com.google.code.gson:gson:2.8.6 +com.google.code.gson:gson:2.8.7 com.google.common.html.types:types:1.0.6 com.google.dagger:dagger:2.33 com.google.errorprone:error_prone_annotations:2.7.1 @@ -136,8 +136,8 @@ com.google.oauth-client:google-oauth-client-java6:1.31.4 com.google.oauth-client:google-oauth-client-jetty:1.31.4 com.google.oauth-client:google-oauth-client-servlet:1.31.4 com.google.oauth-client:google-oauth-client:1.31.5 -com.google.protobuf:protobuf-java-util:3.17.2 -com.google.protobuf:protobuf-java:3.17.2 +com.google.protobuf:protobuf-java-util:3.17.3 +com.google.protobuf:protobuf-java:3.17.3 com.google.re2j:re2j:1.6 com.google.template:soy:2021-02-01 com.google.truth.extensions:truth-java8-extension:1.1.2 @@ -161,7 +161,7 @@ io.github.classgraph:classgraph:4.8.102 io.grpc:grpc-alts:1.36.0 io.grpc:grpc-api:1.36.0 io.grpc:grpc-auth:1.36.0 -io.grpc:grpc-context:1.37.1 +io.grpc:grpc-context:1.39.0 io.grpc:grpc-core:1.36.0 io.grpc:grpc-grpclb:1.36.0 io.grpc:grpc-netty-shaded:1.36.0 diff --git a/core/gradle/dependency-locks/testRuntime.lockfile b/core/gradle/dependency-locks/testRuntime.lockfile index 5096bf38c..ed533b96b 100644 --- a/core/gradle/dependency-locks/testRuntime.lockfile +++ b/core/gradle/dependency-locks/testRuntime.lockfile @@ -32,7 +32,7 @@ com.google.api-client:google-api-client-appengine:1.31.3 com.google.api-client:google-api-client-jackson2:1.30.10 com.google.api-client:google-api-client-java6:1.31.3 com.google.api-client:google-api-client-servlet:1.31.3 -com.google.api-client:google-api-client:1.31.5 +com.google.api-client:google-api-client:1.32.1 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:1.5.5 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.105.5 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.105.5 @@ -60,10 +60,10 @@ com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:2.0.2 com.google.api.grpc:proto-google-cloud-spanner-v1:2.0.2 com.google.api.grpc:proto-google-common-protos:2.3.2 com.google.api.grpc:proto-google-iam-v1:1.0.14 -com.google.api:api-common:1.10.3 +com.google.api:api-common:1.10.4 com.google.api:gax-grpc:1.62.0 -com.google.api:gax-httpjson:0.81.0 -com.google.api:gax:1.65.0 +com.google.api:gax-httpjson:0.83.0 +com.google.api:gax:1.66.0 com.google.apis:google-api-services-admin-directory:directory_v1-rev118-1.25.0 com.google.apis:google-api-services-appengine:v1-rev130-1.25.0 com.google.apis:google-api-services-bigquery:v2-rev20200916-1.30.10 @@ -80,7 +80,7 @@ com.google.apis:google-api-services-monitoring:v3-rev540-1.25.0 com.google.apis:google-api-services-pubsub:v1-rev20200713-1.30.10 com.google.apis:google-api-services-sheets:v4-rev612-1.25.0 com.google.apis:google-api-services-sqladmin:v1beta4-rev20210119-1.31.0 -com.google.apis:google-api-services-storage:v1-rev20210127-1.31.0 +com.google.apis:google-api-services-storage:v1-rev20210127-1.32.1 com.google.appengine.tools:appengine-gcs-client:0.8.1 com.google.appengine.tools:appengine-mapreduce:0.9 com.google.appengine.tools:appengine-pipeline:0.2.13 @@ -103,16 +103,16 @@ com.google.cloud:google-cloud-bigquery:1.122.2 com.google.cloud:google-cloud-bigquerystorage:1.5.5 com.google.cloud:google-cloud-bigtable:1.14.0 com.google.cloud:google-cloud-core-grpc:1.93.9 -com.google.cloud:google-cloud-core-http:1.94.8 -com.google.cloud:google-cloud-core:1.95.0 -com.google.cloud:google-cloud-nio:0.123.2 +com.google.cloud:google-cloud-core-http:1.95.4 +com.google.cloud:google-cloud-core:1.95.4 +com.google.cloud:google-cloud-nio:0.123.4 com.google.cloud:google-cloud-pubsub:1.110.0 com.google.cloud:google-cloud-pubsublite:0.7.0 com.google.cloud:google-cloud-secretmanager:1.4.0 com.google.cloud:google-cloud-spanner:2.0.2 -com.google.cloud:google-cloud-storage:1.115.0 +com.google.cloud:google-cloud-storage:1.118.0 com.google.code.findbugs:jsr305:3.0.2 -com.google.code.gson:gson:2.8.6 +com.google.code.gson:gson:2.8.7 com.google.common.html.types:types:1.0.6 com.google.dagger:dagger:2.33 com.google.errorprone:error_prone_annotations:2.7.1 @@ -143,8 +143,8 @@ com.google.oauth-client:google-oauth-client-java6:1.31.4 com.google.oauth-client:google-oauth-client-jetty:1.31.4 com.google.oauth-client:google-oauth-client-servlet:1.31.4 com.google.oauth-client:google-oauth-client:1.31.5 -com.google.protobuf:protobuf-java-util:3.17.2 -com.google.protobuf:protobuf-java:3.17.2 +com.google.protobuf:protobuf-java-util:3.17.3 +com.google.protobuf:protobuf-java:3.17.3 com.google.re2j:re2j:1.6 com.google.template:soy:2021-02-01 com.google.truth.extensions:truth-java8-extension:1.1.2 @@ -172,7 +172,7 @@ io.github.java-diff-utils:java-diff-utils:4.9 io.grpc:grpc-alts:1.36.0 io.grpc:grpc-api:1.36.0 io.grpc:grpc-auth:1.36.0 -io.grpc:grpc-context:1.37.1 +io.grpc:grpc-context:1.39.0 io.grpc:grpc-core:1.36.0 io.grpc:grpc-grpclb:1.36.0 io.grpc:grpc-netty-shaded:1.36.0 diff --git a/core/gradle/dependency-locks/testRuntimeClasspath.lockfile b/core/gradle/dependency-locks/testRuntimeClasspath.lockfile index d9d835407..e2687ded6 100644 --- a/core/gradle/dependency-locks/testRuntimeClasspath.lockfile +++ b/core/gradle/dependency-locks/testRuntimeClasspath.lockfile @@ -32,7 +32,7 @@ com.google.api-client:google-api-client-appengine:1.31.3 com.google.api-client:google-api-client-jackson2:1.30.10 com.google.api-client:google-api-client-java6:1.31.3 com.google.api-client:google-api-client-servlet:1.31.3 -com.google.api-client:google-api-client:1.31.5 +com.google.api-client:google-api-client:1.32.1 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1:1.5.5 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta1:0.105.5 com.google.api.grpc:grpc-google-cloud-bigquerystorage-v1beta2:0.105.5 @@ -60,10 +60,10 @@ com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:2.0.2 com.google.api.grpc:proto-google-cloud-spanner-v1:2.0.2 com.google.api.grpc:proto-google-common-protos:2.3.2 com.google.api.grpc:proto-google-iam-v1:1.0.14 -com.google.api:api-common:1.10.3 +com.google.api:api-common:1.10.4 com.google.api:gax-grpc:1.62.0 -com.google.api:gax-httpjson:0.81.0 -com.google.api:gax:1.65.0 +com.google.api:gax-httpjson:0.83.0 +com.google.api:gax:1.66.0 com.google.apis:google-api-services-admin-directory:directory_v1-rev118-1.25.0 com.google.apis:google-api-services-appengine:v1-rev130-1.25.0 com.google.apis:google-api-services-bigquery:v2-rev20200916-1.30.10 @@ -80,7 +80,7 @@ com.google.apis:google-api-services-monitoring:v3-rev540-1.25.0 com.google.apis:google-api-services-pubsub:v1-rev20200713-1.30.10 com.google.apis:google-api-services-sheets:v4-rev612-1.25.0 com.google.apis:google-api-services-sqladmin:v1beta4-rev20210119-1.31.0 -com.google.apis:google-api-services-storage:v1-rev20210127-1.31.0 +com.google.apis:google-api-services-storage:v1-rev20210127-1.32.1 com.google.appengine.tools:appengine-gcs-client:0.8.1 com.google.appengine.tools:appengine-mapreduce:0.9 com.google.appengine.tools:appengine-pipeline:0.2.13 @@ -103,16 +103,16 @@ com.google.cloud:google-cloud-bigquery:1.122.2 com.google.cloud:google-cloud-bigquerystorage:1.5.5 com.google.cloud:google-cloud-bigtable:1.14.0 com.google.cloud:google-cloud-core-grpc:1.93.9 -com.google.cloud:google-cloud-core-http:1.94.8 -com.google.cloud:google-cloud-core:1.95.0 -com.google.cloud:google-cloud-nio:0.123.2 +com.google.cloud:google-cloud-core-http:1.95.4 +com.google.cloud:google-cloud-core:1.95.4 +com.google.cloud:google-cloud-nio:0.123.4 com.google.cloud:google-cloud-pubsub:1.110.0 com.google.cloud:google-cloud-pubsublite:0.7.0 com.google.cloud:google-cloud-secretmanager:1.4.0 com.google.cloud:google-cloud-spanner:2.0.2 -com.google.cloud:google-cloud-storage:1.115.0 +com.google.cloud:google-cloud-storage:1.118.0 com.google.code.findbugs:jsr305:3.0.2 -com.google.code.gson:gson:2.8.6 +com.google.code.gson:gson:2.8.7 com.google.common.html.types:types:1.0.6 com.google.dagger:dagger:2.33 com.google.errorprone:error_prone_annotations:2.7.1 @@ -143,8 +143,8 @@ com.google.oauth-client:google-oauth-client-java6:1.31.4 com.google.oauth-client:google-oauth-client-jetty:1.31.4 com.google.oauth-client:google-oauth-client-servlet:1.31.4 com.google.oauth-client:google-oauth-client:1.31.5 -com.google.protobuf:protobuf-java-util:3.17.2 -com.google.protobuf:protobuf-java:3.17.2 +com.google.protobuf:protobuf-java-util:3.17.3 +com.google.protobuf:protobuf-java:3.17.3 com.google.re2j:re2j:1.6 com.google.template:soy:2021-02-01 com.google.truth.extensions:truth-java8-extension:1.1.2 @@ -172,7 +172,7 @@ io.github.java-diff-utils:java-diff-utils:4.9 io.grpc:grpc-alts:1.36.0 io.grpc:grpc-api:1.36.0 io.grpc:grpc-auth:1.36.0 -io.grpc:grpc-context:1.37.1 +io.grpc:grpc-context:1.39.0 io.grpc:grpc-core:1.36.0 io.grpc:grpc-grpclb:1.36.0 io.grpc:grpc-netty-shaded:1.36.0 diff --git a/core/src/test/java/google/registry/backup/ExportCommitLogDiffActionTest.java b/core/src/test/java/google/registry/backup/ExportCommitLogDiffActionTest.java index 60d6c3761..28fb184ad 100644 --- a/core/src/test/java/google/registry/backup/ExportCommitLogDiffActionTest.java +++ b/core/src/test/java/google/registry/backup/ExportCommitLogDiffActionTest.java @@ -25,10 +25,10 @@ import static google.registry.util.DateTimeUtils.START_OF_TIME; import static org.joda.time.DateTimeZone.UTC; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.collect.ImmutableMap; import com.googlecode.objectify.Key; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.model.ImmutableObject; import google.registry.model.ofy.CommitLogBucket; import google.registry.model.ofy.CommitLogCheckpoint; diff --git a/core/src/test/java/google/registry/backup/GcsDiffFileListerTest.java b/core/src/test/java/google/registry/backup/GcsDiffFileListerTest.java index 94ecf0a03..e7497ed18 100644 --- a/core/src/test/java/google/registry/backup/GcsDiffFileListerTest.java +++ b/core/src/test/java/google/registry/backup/GcsDiffFileListerTest.java @@ -29,13 +29,13 @@ import static org.mockito.Mockito.when; import com.google.cloud.storage.BlobId; import com.google.cloud.storage.BlobInfo; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.flogger.LoggerConfig; import com.google.common.testing.TestLogHandler; import com.google.common.util.concurrent.MoreExecutors; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.testing.AppEngineExtension; import java.io.IOException; import java.util.concurrent.Executors; diff --git a/core/src/test/java/google/registry/backup/ReplayCommitLogsToSqlActionTest.java b/core/src/test/java/google/registry/backup/ReplayCommitLogsToSqlActionTest.java index 79a3b17fc..553475b8e 100644 --- a/core/src/test/java/google/registry/backup/ReplayCommitLogsToSqlActionTest.java +++ b/core/src/test/java/google/registry/backup/ReplayCommitLogsToSqlActionTest.java @@ -36,6 +36,7 @@ import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -44,7 +45,6 @@ import com.google.common.truth.Truth8; import com.google.common.util.concurrent.MoreExecutors; import com.googlecode.objectify.Key; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.model.common.DatabaseMigrationStateSchedule; import google.registry.model.common.DatabaseMigrationStateSchedule.MigrationState; import google.registry.model.contact.ContactResource; diff --git a/core/src/test/java/google/registry/backup/RestoreCommitLogsActionTest.java b/core/src/test/java/google/registry/backup/RestoreCommitLogsActionTest.java index 0e2733f5d..099867f8f 100644 --- a/core/src/test/java/google/registry/backup/RestoreCommitLogsActionTest.java +++ b/core/src/test/java/google/registry/backup/RestoreCommitLogsActionTest.java @@ -28,6 +28,7 @@ import static org.joda.time.DateTimeZone.UTC; import com.google.appengine.api.datastore.DatastoreServiceFactory; import com.google.cloud.storage.BlobId; import com.google.cloud.storage.BlobInfo; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Lists; @@ -36,7 +37,6 @@ import com.google.common.primitives.Longs; import com.google.common.util.concurrent.MoreExecutors; import com.googlecode.objectify.Key; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.model.ImmutableObject; import google.registry.model.domain.DomainBase; import google.registry.model.ofy.CommitLogBucket; diff --git a/core/src/test/java/google/registry/beam/rde/RdePipelineTest.java b/core/src/test/java/google/registry/beam/rde/RdePipelineTest.java index 53c73999d..e5d88e341 100644 --- a/core/src/test/java/google/registry/beam/rde/RdePipelineTest.java +++ b/core/src/test/java/google/registry/beam/rde/RdePipelineTest.java @@ -41,6 +41,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.joda.time.Duration.standardDays; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; @@ -50,7 +51,6 @@ import com.google.common.collect.Streams; import com.google.common.io.BaseEncoding; import google.registry.beam.TestPipelineExtension; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.keyring.api.PgpHelper; import google.registry.model.common.Cursor; import google.registry.model.common.Cursor.CursorType; diff --git a/core/src/test/java/google/registry/export/ExportDomainListsActionTest.java b/core/src/test/java/google/registry/export/ExportDomainListsActionTest.java index 2af29c6c9..7d5d5dddc 100644 --- a/core/src/test/java/google/registry/export/ExportDomainListsActionTest.java +++ b/core/src/test/java/google/registry/export/ExportDomainListsActionTest.java @@ -29,11 +29,11 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; import com.google.cloud.storage.BlobId; import com.google.cloud.storage.StorageException; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.collect.ImmutableList; import com.google.common.net.MediaType; import google.registry.export.ExportDomainListsAction.ExportDomainListsReducer; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.model.ofy.Ofy; import google.registry.model.registry.Registry; import google.registry.model.registry.Registry.TldType; diff --git a/core/src/test/java/google/registry/gcs/GcsUtilsTest.java b/core/src/test/java/google/registry/gcs/GcsUtilsTest.java index 31f618d00..6e38285b2 100644 --- a/core/src/test/java/google/registry/gcs/GcsUtilsTest.java +++ b/core/src/test/java/google/registry/gcs/GcsUtilsTest.java @@ -19,11 +19,11 @@ import static com.google.common.truth.Truth.assertThat; import com.google.cloud.storage.BlobId; import com.google.cloud.storage.BlobInfo; import com.google.cloud.storage.StorageOptions; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.io.ByteStreams; import com.google.common.net.MediaType; -import google.registry.gcs.backport.LocalStorageHelper; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/core/src/test/java/google/registry/gcs/backport/FakeStorageRpc.java b/core/src/test/java/google/registry/gcs/backport/FakeStorageRpc.java deleted file mode 100644 index 74210e68e..000000000 --- a/core/src/test/java/google/registry/gcs/backport/FakeStorageRpc.java +++ /dev/null @@ -1,517 +0,0 @@ -/* - * Copyright 2016 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package google.registry.gcs.backport; - -import com.google.api.client.util.DateTime; -import com.google.api.services.storage.model.Bucket; -import com.google.api.services.storage.model.ServiceAccount; -import com.google.api.services.storage.model.StorageObject; -import com.google.cloud.Tuple; -import com.google.cloud.storage.Storage; -import com.google.cloud.storage.StorageException; -import com.google.cloud.storage.spi.v1.StorageRpc; -import com.google.cloud.storage.testing.StorageRpcTestBase; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.math.BigInteger; -import java.nio.file.FileAlreadyExistsException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.annotation.concurrent.NotThreadSafe; - -/** - * A bare-bones in-memory implementation of StorageRpc, meant for testing. - * - *

This class is not thread-safe. It's also (currently) limited in the following ways: - * - *

- */ -@NotThreadSafe -class FakeStorageRpc extends StorageRpcTestBase { - - private static final SimpleDateFormat RFC_3339_FORMATTER = - new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX"); - - // fullname -> metadata - Map metadata = new HashMap<>(); - // fullname -> contents - Map contents = new HashMap<>(); - // fullname -> future contents that will be visible on close. - Map futureContents = new HashMap<>(); - - private final boolean throwIfOption; - - /** @param throwIfOption if true, we throw when given any option */ - public FakeStorageRpc(boolean throwIfOption) { - this.throwIfOption = throwIfOption; - } - - // remove all files - void reset() { - metadata = new HashMap<>(); - contents = new HashMap<>(); - } - - @Override - public StorageObject create(StorageObject object, InputStream content, Map options) - throws StorageException { - potentiallyThrow(options); - String key = fullname(object); - object.setUpdated(now()); - metadata.put(key, object); - try { - contents.put(key, com.google.common.io.ByteStreams.toByteArray(content)); - } catch (IOException e) { - throw new StorageException(e); - } - // TODO: crc, etc - return object; - } - - @Override - public Tuple> list(String bucket, Map options) - throws StorageException { - String delimiter = null; - String preprefix = ""; - String pageToken = null; - long maxResults = Long.MAX_VALUE; - for (Map.Entry e : options.entrySet()) { - switch (e.getKey()) { - case PAGE_TOKEN: - pageToken = (String) e.getValue(); - break; - case PREFIX: - preprefix = (String) e.getValue(); - if (preprefix.startsWith("/")) { - preprefix = preprefix.substring(1); - } - break; - case DELIMITER: - delimiter = (String) e.getValue(); - break; - case FIELDS: - // ignore and return all the fields - break; - case MAX_RESULTS: - maxResults = (Long) e.getValue(); - break; - case USER_PROJECT: - // prevent unsupported operation - break; - default: - throw new UnsupportedOperationException("Unknown option: " + e.getKey()); - } - } - final String prefix = preprefix; - - List values = new ArrayList<>(); - Map folders = new HashMap<>(); - for (StorageObject so : metadata.values()) { - if (!so.getBucket().equals(bucket) || !so.getName().startsWith(prefix)) { - continue; - } - if (processedAsFolder(so, delimiter, prefix, folders)) { - continue; - } - so.setSize(size(so)); - values.add(so); - } - values.addAll(folders.values()); - - // truncate to max allowed length - if (values.size() > maxResults) { - List newValues = new ArrayList<>(); - for (int i = 0; i < maxResults; i++) { - newValues.add(values.get(i)); - } - values = newValues; - } - - // null cursor to indicate there is no more data (empty string would cause us to be called - // again). - // The type cast seems to be necessary to help Java's typesystem remember that collections are - // iterable. - return Tuple.of(pageToken, (Iterable) values); - } - - /** Returns the requested bucket or {@code null} if not found. */ - @Override - public Bucket get(Bucket bucket, Map options) throws StorageException { - potentiallyThrow(options); - return null; - } - - /** Returns the requested storage object or {@code null} if not found. */ - @Override - public StorageObject get(StorageObject object, Map options) throws StorageException { - // we allow the "ID" option because we need to, but then we give a whole answer anyways - // because the caller won't mind the extra fields. - if (throwIfOption - && !options.isEmpty() - && options.size() > 1 - && options.keySet().toArray()[0] != Storage.BlobGetOption.fields(Storage.BlobField.ID)) { - throw new UnsupportedOperationException(); - } - - String key = fullname(object); - if (metadata.containsKey(key)) { - StorageObject ret = metadata.get(key); - ret.setSize(size(ret)); - ret.setId(key); - - return ret; - } - return null; - } - - @Override - public Bucket patch(Bucket bucket, Map options) throws StorageException { - potentiallyThrow(options); - return null; - } - - @Override - public StorageObject patch(StorageObject storageObject, Map options) - throws StorageException { - potentiallyThrow(options); - return null; - } - - @Override - public boolean delete(Bucket bucket, Map options) throws StorageException { - return false; - } - - @Override - public boolean delete(StorageObject object, Map options) throws StorageException { - String key = fullname(object); - contents.remove(key); - return null != metadata.remove(key); - } - - @Override - public StorageObject compose( - Iterable sources, StorageObject target, Map targetOptions) - throws StorageException { - return null; - } - - @Override - public byte[] load(StorageObject storageObject, Map options) throws StorageException { - String key = fullname(storageObject); - if (!contents.containsKey(key)) { - throw new StorageException(404, "File not found: " + key); - } - return contents.get(key); - } - - @Override - public Tuple read( - StorageObject from, Map options, long zposition, int zbytes) - throws StorageException { - // if non-null, then we check the file's at that generation. - Long generationMatch = null; - for (Option op : options.keySet()) { - if (op.equals(StorageRpc.Option.IF_GENERATION_MATCH)) { - generationMatch = (Long) options.get(op); - } else { - throw new UnsupportedOperationException("Unknown option: " + op); - } - } - String key = fullname(from); - if (!contents.containsKey(key)) { - throw new StorageException(404, "File not found: " + key); - } - checkGeneration(key, generationMatch); - long position = zposition; - int bytes = zbytes; - if (position < 0) { - position = 0; - } - byte[] full = contents.get(key); - if ((int) position + bytes > full.length) { - bytes = full.length - (int) position; - } - if (bytes <= 0) { - // special case: you're trying to read past the end - return Tuple.of("etag-goes-here", new byte[0]); - } - byte[] ret = new byte[bytes]; - System.arraycopy(full, (int) position, ret, 0, bytes); - return Tuple.of("etag-goes-here", ret); - } - - @Override - public long read( - StorageObject from, Map options, long position, OutputStream outputStream) { - // if non-null, then we check the file's at that generation. - Long generationMatch = null; - for (Option op : options.keySet()) { - if (op.equals(StorageRpc.Option.IF_GENERATION_MATCH)) { - generationMatch = (Long) options.get(op); - } else { - throw new UnsupportedOperationException("Unknown option: " + op); - } - } - String key = fullname(from); - if (!contents.containsKey(key)) { - throw new StorageException(404, "File not found: " + key); - } - checkGeneration(key, generationMatch); - if (position < 0) { - position = 0; - } - byte[] full = contents.get(key); - int bytes = (int) (full.length - position); - if (bytes <= 0) { - // special case: you're trying to read past the end - return 0; - } - try { - outputStream.write(full, (int) position, bytes); - } catch (IOException e) { - throw new StorageException(500, "Failed to write to file", e); - } - return bytes; - } - - @Override - public String open(StorageObject object, Map options) throws StorageException { - String key = fullname(object); - // if non-null, then we check the file's at that generation. - Long generationMatch = null; - for (Option option : options.keySet()) { - // this is a bit of a hack, since we don't implement generations. - if (option == Option.IF_GENERATION_MATCH) { - generationMatch = (Long) options.get(option); - } - } - checkGeneration(key, generationMatch); - metadata.put(key, object); - - return fullname(object); - } - - @Override - public String open(String signedURL) { - return null; - } - - @Override - public void write( - String uploadId, byte[] toWrite, int toWriteOffset, long destOffset, int length, boolean last) - throws StorageException { - writeWithResponse(uploadId, toWrite, toWriteOffset, destOffset, length, last); - } - - @Override - public StorageObject writeWithResponse( - String uploadId, - byte[] toWrite, - int toWriteOffset, - long destOffset, - int length, - boolean last) { - // this may have a lot more allocations than ideal, but it'll work. - byte[] bytes; - if (futureContents.containsKey(uploadId)) { - bytes = futureContents.get(uploadId); - if (bytes.length < length + destOffset) { - byte[] newBytes = new byte[(int) (length + destOffset)]; - System.arraycopy(bytes, 0, newBytes, (int) 0, bytes.length); - bytes = newBytes; - } - } else { - bytes = new byte[(int) (length + destOffset)]; - } - System.arraycopy(toWrite, toWriteOffset, bytes, (int) destOffset, length); - // we want to mimic the GCS behavior that file contents are only visible on close. - StorageObject storageObject = null; - if (last) { - contents.put(uploadId, bytes); - futureContents.remove(uploadId); - if (metadata.containsKey(uploadId)) { - storageObject = metadata.get(uploadId); - storageObject.setUpdated(now()); - Long generation = storageObject.getGeneration(); - if (null == generation) { - generation = Long.valueOf(0); - } - storageObject.setGeneration(++generation); - metadata.put(uploadId, storageObject); - } - } else { - futureContents.put(uploadId, bytes); - } - return storageObject; - } - - @Override - public RewriteResponse openRewrite(RewriteRequest rewriteRequest) throws StorageException { - String sourceKey = fullname(rewriteRequest.source); - - // a little hackish, just good enough for the tests to work. - if (!contents.containsKey(sourceKey)) { - throw new StorageException(404, "File not found: " + sourceKey); - } - - // if non-null, then we check the file's at that generation. - Long generationMatch = null; - for (Option option : rewriteRequest.targetOptions.keySet()) { - // this is a bit of a hack, since we don't implement generations. - if (option == Option.IF_GENERATION_MATCH) { - generationMatch = (Long) rewriteRequest.targetOptions.get(option); - } - } - - String destKey = fullname(rewriteRequest.target); - - // if this is a new file, set generation to 1, else increment the existing generation - long generation = 1; - if (metadata.containsKey(destKey)) { - generation = metadata.get(destKey).getGeneration() + 1; - } - - checkGeneration(destKey, generationMatch); - - byte[] data = contents.get(sourceKey); - - rewriteRequest.target.setGeneration(generation); - rewriteRequest.target.setSize(BigInteger.valueOf(data.length)); - rewriteRequest.target.setUpdated(metadata.get(sourceKey).getUpdated()); - - metadata.put(destKey, rewriteRequest.target); - - contents.put(destKey, Arrays.copyOf(data, data.length)); - return new RewriteResponse( - rewriteRequest, - rewriteRequest.target, - data.length, - true, - "rewriteToken goes here", - data.length); - } - - private static DateTime now() { - return DateTime.parseRfc3339(RFC_3339_FORMATTER.format(new Date())); - } - - private String fullname(StorageObject so) { - return (so.getBucket() + "/" + so.getName()); - } - - private BigInteger size(StorageObject so) { - String key = fullname(so); - - if (contents.containsKey(key)) { - return BigInteger.valueOf(contents.get(key).length); - } - - return null; - } - - private void potentiallyThrow(Map options) throws UnsupportedOperationException { - if (throwIfOption && !options.isEmpty()) { - throw new UnsupportedOperationException(); - } - } - - /** - * Throw if we're asking for generation 0 and the file exists, or if the requested generation - * number doesn't match what is asked. - * - * @param key - * @param generationMatch - */ - private void checkGeneration(String key, Long generationMatch) { - if (null == generationMatch) { - return; - } - if (generationMatch == 0 && metadata.containsKey(key)) { - throw new StorageException(new FileAlreadyExistsException(key)); - } - if (generationMatch != 0) { - Long generation = metadata.get(key).getGeneration(); - if (!generationMatch.equals(generation)) { - throw new StorageException( - 404, "Generation mismatch. Requested " + generationMatch + " but got " + generation); - } - } - } - - // Returns true if this is a folder. Adds it to folders if it isn't already there. - private static boolean processedAsFolder( - StorageObject so, - String delimiter, - String prefix, /* inout */ - Map folders) { - if (delimiter == null) { - return false; - } - int nextSlash = so.getName().indexOf(delimiter, prefix.length()); - if (nextSlash < 0) { - return false; - } - String folderName = so.getName().substring(0, nextSlash + 1); - if (folders.containsKey(folderName)) { - return true; - } - StorageObject fakeFolder = new StorageObject(); - fakeFolder.setName(folderName); - fakeFolder.setBucket(so.getBucket()); - fakeFolder.setGeneration(so.getGeneration()); - fakeFolder.set("isDirectory", true); - fakeFolder.setSize(BigInteger.ZERO); - folders.put(folderName, fakeFolder); - return true; - } - - @Override - public ServiceAccount getServiceAccount(String projectId) { - return null; - } -} diff --git a/core/src/test/java/google/registry/gcs/backport/LocalStorageHelper.java b/core/src/test/java/google/registry/gcs/backport/LocalStorageHelper.java deleted file mode 100644 index e4b51c348..000000000 --- a/core/src/test/java/google/registry/gcs/backport/LocalStorageHelper.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2016 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package google.registry.gcs.backport; - -import com.google.cloud.ServiceRpc; -import com.google.cloud.spi.ServiceRpcFactory; -import com.google.cloud.storage.StorageOptions; - -/** - * Utility to create an in-memory storage configuration for testing. Storage options can be obtained - * via the {@link #getOptions()} method. Returned options will point to FakeStorageRpc. - * - *

Note, the created in-memory storage configuration supports limited set of operations and is - * not thread-safe: - * - *

    - *
  • Supported operations - *
      - *
    • object create - *
    • object get - *
    • object delete - *
    • list the contents of a bucket - *
    - *
  • Unsupported operations - *
      - *
    • bucket create - *
    • bucket get - *
    • bucket delete - *
    • list all buckets - *
    • generations - *
    • file attributes - *
    • patch - *
    • continueRewrite - *
    • createBatch - *
    • checksums, etags - *
    • IAM operations - *
    - *
- * - * {@link FakeStorageRpc#list(String, java.util.Map)} lists all the objects that have been created - * rather than the objects in the provided bucket. Since this class does not support creating, - * listing and deleting buckets, the parameter bucket here is not actually used and on serves as a - * placeholder. - */ -public final class LocalStorageHelper { - - // used for testing. Will throw if you pass it an option. - private static final FakeStorageRpc instance = new FakeStorageRpc(true); - - private LocalStorageHelper() {} - - /** - * Returns a {@link StorageOptions} that use the static FakeStorageRpc instance, and resets it - * first so you start from a clean slate. That instance will throw if you pass it any option. - */ - public static StorageOptions getOptions() { - instance.reset(); - return StorageOptions.newBuilder() - .setProjectId("fake-project-for-testing") - .setServiceRpcFactory(new FakeStorageRpcFactory()) - .build(); - } - - /** - * Returns a {@link StorageOptions} that creates a new FakeStorageRpc instance with the given - * option. - */ - public static StorageOptions customOptions(final boolean throwIfOptions) { - return StorageOptions.newBuilder() - .setProjectId("fake-project-for-testing") - .setServiceRpcFactory(new FakeStorageRpcFactory(new FakeStorageRpc(throwIfOptions))) - .build(); - } - - public static class FakeStorageRpcFactory implements ServiceRpcFactory { - - private final FakeStorageRpc instance; - - public FakeStorageRpcFactory() { - this(LocalStorageHelper.instance); - } - - public FakeStorageRpcFactory(FakeStorageRpc instance) { - this.instance = instance; - } - - @Override - public ServiceRpc create(StorageOptions storageOptions) { - return instance; - } - } -} diff --git a/core/src/test/java/google/registry/gcs/backport/README.md b/core/src/test/java/google/registry/gcs/backport/README.md deleted file mode 100644 index caa714b7e..000000000 --- a/core/src/test/java/google/registry/gcs/backport/README.md +++ /dev/null @@ -1,9 +0,0 @@ -The files here are directly lifted -from [googleapis/java-storage-nio](https://github.com/googleapis/java-storage-nio/tree/master/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/testing) -. They are needed because the `StorageOptions` returned from `LocalStorageHelper.getOptions()` -should be serializable for the `GcsUtils` class itself to be serializable in tests, but is not. The -bug is [fixed](https://github.com/googleapis/java-storage-nio/pull/606) upstream. However, the -current released package does not contain the fix yet. - -They are not put under `common/testing` because we do not want to introduce a dependency on the -testing configuration from core. \ No newline at end of file diff --git a/core/src/test/java/google/registry/rde/BrdaCopyActionTest.java b/core/src/test/java/google/registry/rde/BrdaCopyActionTest.java index 426d90d81..81898ae17 100644 --- a/core/src/test/java/google/registry/rde/BrdaCopyActionTest.java +++ b/core/src/test/java/google/registry/rde/BrdaCopyActionTest.java @@ -21,11 +21,11 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.jupiter.api.Assumptions.assumeTrue; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.io.ByteSource; import com.google.common.io.CharStreams; import com.google.common.io.Files; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.keyring.api.Keyring; import google.registry.testing.AppEngineExtension; import google.registry.testing.BouncyCastleProviderExtension; diff --git a/core/src/test/java/google/registry/rde/RdeReportActionTest.java b/core/src/test/java/google/registry/rde/RdeReportActionTest.java index eda53a3de..9de36c171 100644 --- a/core/src/test/java/google/registry/rde/RdeReportActionTest.java +++ b/core/src/test/java/google/registry/rde/RdeReportActionTest.java @@ -40,11 +40,11 @@ import com.google.appengine.api.urlfetch.HTTPRequest; import com.google.appengine.api.urlfetch.HTTPResponse; import com.google.appengine.api.urlfetch.URLFetchService; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.base.Ascii; import com.google.common.collect.ImmutableMap; import com.google.common.io.ByteSource; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.model.common.Cursor; import google.registry.model.rde.RdeRevision; import google.registry.model.registry.Registry; diff --git a/core/src/test/java/google/registry/rde/RdeStagingActionTest.java b/core/src/test/java/google/registry/rde/RdeStagingActionTest.java index 1b9a72a87..826338a0a 100644 --- a/core/src/test/java/google/registry/rde/RdeStagingActionTest.java +++ b/core/src/test/java/google/registry/rde/RdeStagingActionTest.java @@ -35,12 +35,12 @@ import static java.util.Arrays.asList; import static org.junit.jupiter.api.Assertions.assertThrows; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.net.InetAddresses; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.keyring.api.Keyring; import google.registry.keyring.api.PgpHelper; import google.registry.model.common.Cursor; diff --git a/core/src/test/java/google/registry/rde/RdeStagingReducerTest.java b/core/src/test/java/google/registry/rde/RdeStagingReducerTest.java index 5f06b891e..283f36a8e 100644 --- a/core/src/test/java/google/registry/rde/RdeStagingReducerTest.java +++ b/core/src/test/java/google/registry/rde/RdeStagingReducerTest.java @@ -29,10 +29,10 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import com.google.appengine.tools.mapreduce.ReducerInput; import com.google.cloud.storage.BlobId; import com.google.cloud.storage.StorageException; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.collect.ImmutableList; import google.registry.beam.rde.RdePipelineTest; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.keyring.api.PgpHelper; import google.registry.model.common.Cursor; import google.registry.model.common.Cursor.CursorType; diff --git a/core/src/test/java/google/registry/rde/RdeUploadActionTest.java b/core/src/test/java/google/registry/rde/RdeUploadActionTest.java index 271f669d6..a16d102d9 100644 --- a/core/src/test/java/google/registry/rde/RdeUploadActionTest.java +++ b/core/src/test/java/google/registry/rde/RdeUploadActionTest.java @@ -44,6 +44,7 @@ import static org.mockito.Mockito.when; import com.google.appengine.api.taskqueue.QueueFactory; import com.google.appengine.api.utils.SystemProperty; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.io.ByteSource; import com.google.common.io.CharStreams; import com.google.common.io.Files; @@ -51,7 +52,6 @@ import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException; import com.jcraft.jsch.Session; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.keyring.api.Keyring; import google.registry.model.common.Cursor; import google.registry.model.common.Cursor.CursorType; diff --git a/core/src/test/java/google/registry/reporting/billing/CopyDetailReportsActionTest.java b/core/src/test/java/google/registry/reporting/billing/CopyDetailReportsActionTest.java index fc2d79f7a..61d1c0581 100644 --- a/core/src/test/java/google/registry/reporting/billing/CopyDetailReportsActionTest.java +++ b/core/src/test/java/google/registry/reporting/billing/CopyDetailReportsActionTest.java @@ -29,9 +29,9 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.net.MediaType; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.storage.drive.DriveConnection; import google.registry.testing.AppEngineExtension; import google.registry.testing.FakeClock; diff --git a/core/src/test/java/google/registry/reporting/icann/IcannReportingStagerTest.java b/core/src/test/java/google/registry/reporting/icann/IcannReportingStagerTest.java index 716ece531..bfce9ddfc 100644 --- a/core/src/test/java/google/registry/reporting/icann/IcannReportingStagerTest.java +++ b/core/src/test/java/google/registry/reporting/icann/IcannReportingStagerTest.java @@ -22,6 +22,7 @@ import static org.mockito.Mockito.when; import com.google.api.services.bigquery.model.TableFieldSchema; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableTable; import com.google.common.util.concurrent.ListenableFuture; @@ -29,7 +30,6 @@ import google.registry.bigquery.BigqueryConnection; import google.registry.bigquery.BigqueryConnection.DestinationTable; import google.registry.bigquery.BigqueryUtils.TableType; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.reporting.icann.IcannReportingModule.ReportType; import google.registry.testing.AppEngineExtension; import google.registry.testing.FakeResponse; diff --git a/core/src/test/java/google/registry/reporting/icann/IcannReportingUploadActionTest.java b/core/src/test/java/google/registry/reporting/icann/IcannReportingUploadActionTest.java index 68be3ed91..3a9e32d92 100644 --- a/core/src/test/java/google/registry/reporting/icann/IcannReportingUploadActionTest.java +++ b/core/src/test/java/google/registry/reporting/icann/IcannReportingUploadActionTest.java @@ -29,9 +29,9 @@ import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.testing.TestLogHandler; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.model.common.Cursor; import google.registry.model.common.Cursor.CursorType; import google.registry.model.registry.Registry; diff --git a/core/src/test/java/google/registry/tools/server/GenerateZoneFilesActionTest.java b/core/src/test/java/google/registry/tools/server/GenerateZoneFilesActionTest.java index d771d5e0e..32e709bfb 100644 --- a/core/src/test/java/google/registry/tools/server/GenerateZoneFilesActionTest.java +++ b/core/src/test/java/google/registry/tools/server/GenerateZoneFilesActionTest.java @@ -27,12 +27,12 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static org.joda.time.Duration.standardDays; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.contrib.nio.testing.LocalStorageHelper; import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import google.registry.gcs.GcsUtils; -import google.registry.gcs.backport.LocalStorageHelper; import google.registry.model.domain.secdns.DelegationSignerData; import google.registry.model.eppcommon.StatusValue; import google.registry.model.host.HostResource; diff --git a/dependencies.gradle b/dependencies.gradle index 6fc8766c6..b181f2fc0 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -62,7 +62,7 @@ ext { 'com.google.cloud:google-cloud-core-http:1.94.3', 'com.google.cloud:google-cloud-secretmanager:1.4.0', 'com.google.cloud:google-cloud-storage:1.113.12', - 'com.google.cloud:google-cloud-nio:0.123.2', + 'com.google.cloud:google-cloud-nio:0.123.4', 'com.google.code.findbugs:jsr305:3.0.2', 'com.google.code.gson:gson:2.8.6', 'com.google.dagger:dagger-compiler:2.33',