From e33861ebf1c841b36e883ca2c151ba99dad4f6a3 Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Fri, 10 Jan 2025 21:31:03 +0000 Subject: [PATCH] test: fix HttpRpcContextTest to not attempt environment credentials resolution --- .../com/google/cloud/storage/spi/v1/HttpRpcContextTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/spi/v1/HttpRpcContextTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/spi/v1/HttpRpcContextTest.java index 3e8b295bda..bb049137bf 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/spi/v1/HttpRpcContextTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/spi/v1/HttpRpcContextTest.java @@ -21,6 +21,7 @@ import static org.junit.Assert.assertTrue; import com.google.api.client.testing.http.MockLowLevelHttpResponse; +import com.google.cloud.NoCredentials; import com.google.cloud.TransportOptions; import com.google.cloud.Tuple; import com.google.cloud.WriteChannel; @@ -66,6 +67,8 @@ public void testInvocationIdIsPassedThrough() { Storage service = StorageOptions.getDefaultInstance() .toBuilder() + .setProjectId("test-project") + .setCredentials(NoCredentials.getInstance()) .setTransportOptions(transportOptions) .build() .getService();