From 9a6619c39a89e2c2ee8d0000d595d09ac7b7825f Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Tue, 16 Mar 2021 11:15:07 -0400 Subject: [PATCH] fix(test): update blob paths used in storage.it.ITStorageTest#testDownloadPublicBlobWithoutAuthentication (#759) Port of https://github.com/googleapis/google-cloud-go/pull/3806 Fixes https://github.com/googleapis/java-storage/issues/755 --- .../java/com/google/cloud/storage/it/ITStorageTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java index 80685a277..6c4d0da08 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java @@ -2125,11 +2125,11 @@ public void testDownloadPublicBlobWithoutAuthentication() { // try to download blobs from a public bucket String landsatBucket = "gcp-public-data-landsat"; - String landsatPrefix = "LC08/PRE/044/034/LC80440342016259LGN00/"; - String landsatBlob = landsatPrefix + "LC80440342016259LGN00_MTL.txt"; + String landsatPrefix = "LC08/01/001/002/LC08_L1GT_001002_20160817_20170322_01_T2/"; + String landsatBlob = landsatPrefix + "LC08_L1GT_001002_20160817_20170322_01_T2_ANG.txt"; byte[] bytes = unauthorizedStorage.readAllBytes(landsatBucket, landsatBlob); - assertThat(bytes.length).isEqualTo(7903); + assertThat(bytes.length).isEqualTo(117255); int numBlobs = 0; Iterator blobIterator = unauthorizedStorage @@ -2140,7 +2140,7 @@ public void testDownloadPublicBlobWithoutAuthentication() { numBlobs++; blobIterator.next(); } - assertThat(numBlobs).isEqualTo(13); + assertThat(numBlobs).isEqualTo(14); // try to download blobs from a bucket that requires authentication // authenticated client will succeed