Skip to content

Commit 595c16a

Browse files
jean-philippe-martinmziccard
authored andcommitted
Rename LocalGcsHelper to LocalStorageHelper
1 parent 37fe1eb commit 595c16a

7 files changed

Lines changed: 16 additions & 14 deletions

File tree

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributeViewTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import static com.google.common.truth.Truth.assertThat;
2020
import static java.nio.charset.StandardCharsets.UTF_8;
2121

22-
import com.google.cloud.storage.testing.LocalGcsHelper;
22+
import com.google.cloud.storage.testing.LocalStorageHelper;
2323
import com.google.common.testing.EqualsTester;
2424
import com.google.common.testing.NullPointerTester;
2525

@@ -52,7 +52,7 @@ public class CloudStorageFileAttributeViewTest {
5252

5353
@Before
5454
public void before() {
55-
CloudStorageFileSystemProvider.setGCloudOptions(LocalGcsHelper.options());
55+
CloudStorageFileSystemProvider.setGCloudOptions(LocalStorageHelper.options());
5656
path = Paths.get(URI.create("gs://red/water"));
5757
}
5858

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileAttributesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import static java.nio.charset.StandardCharsets.UTF_8;
2121

2222
import com.google.cloud.storage.Acl;
23-
import com.google.cloud.storage.testing.LocalGcsHelper;
23+
import com.google.cloud.storage.testing.LocalStorageHelper;
2424
import com.google.common.testing.EqualsTester;
2525
import com.google.common.testing.NullPointerTester;
2626

@@ -48,7 +48,7 @@ public class CloudStorageFileAttributesTest {
4848

4949
@Before
5050
public void before() {
51-
CloudStorageFileSystemProvider.setGCloudOptions(LocalGcsHelper.options());
51+
CloudStorageFileSystemProvider.setGCloudOptions(LocalStorageHelper.options());
5252
path = Paths.get(URI.create("gs://bucket/randompath"));
5353
dir = Paths.get(URI.create("gs://bucket/randompath/"));
5454
}

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProviderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING;
2727
import static java.nio.file.StandardOpenOption.WRITE;
2828

29-
import com.google.cloud.storage.testing.LocalGcsHelper;
29+
import com.google.cloud.storage.testing.LocalStorageHelper;
3030
import com.google.common.collect.ImmutableList;
3131
import com.google.common.testing.NullPointerTester;
3232

@@ -91,7 +91,7 @@ public class CloudStorageFileSystemProviderTest {
9191

9292
@Before
9393
public void before() {
94-
CloudStorageFileSystemProvider.setGCloudOptions(LocalGcsHelper.options());
94+
CloudStorageFileSystemProvider.setGCloudOptions(LocalStorageHelper.options());
9595
}
9696

9797
@Test

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
import static com.google.common.truth.Truth.assertThat;
2020
import static java.nio.charset.StandardCharsets.UTF_8;
2121

22-
import com.google.cloud.storage.testing.LocalGcsHelper;
22+
import com.google.cloud.storage.StorageOptions;
23+
import com.google.cloud.storage.testing.LocalStorageHelper;
2324
import com.google.common.testing.EqualsTester;
2425
import com.google.common.testing.NullPointerTester;
2526

@@ -56,7 +57,7 @@ public class CloudStorageFileSystemTest {
5657

5758
@Before
5859
public void before() {
59-
CloudStorageFileSystemProvider.setGCloudOptions(LocalGcsHelper.options());
60+
CloudStorageFileSystemProvider.setGCloudOptions(LocalStorageHelper.options());
6061
}
6162

6263
@Test
@@ -130,7 +131,8 @@ public void testNullness() throws IOException, NoSuchMethodException, SecurityEx
130131
NullPointerTester tester =
131132
new NullPointerTester()
132133
.ignore(CloudStorageFileSystem.class.getMethod("equals", Object.class))
133-
.setDefault(CloudStorageConfiguration.class, CloudStorageConfiguration.DEFAULT);
134+
.setDefault(CloudStorageConfiguration.class, CloudStorageConfiguration.DEFAULT)
135+
.setDefault(StorageOptions.class, LocalStorageHelper.options());
134136
tester.testAllPublicStaticMethods(CloudStorageFileSystem.class);
135137
tester.testAllPublicInstanceMethods(fs);
136138
}

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageOptionsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import static java.nio.charset.StandardCharsets.UTF_8;
2121

2222
import com.google.cloud.storage.Acl;
23-
import com.google.cloud.storage.testing.LocalGcsHelper;
23+
import com.google.cloud.storage.testing.LocalStorageHelper;
2424
import com.google.common.testing.NullPointerTester;
2525

2626
import org.junit.Before;
@@ -42,7 +42,7 @@ public class CloudStorageOptionsTest {
4242

4343
@Before
4444
public void before() {
45-
CloudStorageFileSystemProvider.setGCloudOptions(LocalGcsHelper.options());
45+
CloudStorageFileSystemProvider.setGCloudOptions(LocalStorageHelper.options());
4646
}
4747

4848
@Test

gcloud-java-contrib/gcloud-java-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStoragePathTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020

21-
import com.google.cloud.storage.testing.LocalGcsHelper;
21+
import com.google.cloud.storage.testing.LocalStorageHelper;
2222
import com.google.common.collect.Iterables;
2323
import com.google.common.testing.EqualsTester;
2424
import com.google.common.testing.NullPointerTester;
@@ -47,7 +47,7 @@ public class CloudStoragePathTest {
4747

4848
@Before
4949
public void before() {
50-
CloudStorageFileSystemProvider.setGCloudOptions(LocalGcsHelper.options());
50+
CloudStorageFileSystemProvider.setGCloudOptions(LocalStorageHelper.options());
5151
}
5252

5353
@Test

gcloud-java-storage/src/main/java/com/google/cloud/storage/testing/LocalGcsHelper.java renamed to gcloud-java-storage/src/main/java/com/google/cloud/storage/testing/LocalStorageHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Utility to create an in-memory storage configuration for testing. Storage options can be
2525
* obtained via the {@link #options()} method. Returned options will point to FakeStorageRpc.
2626
*/
27-
public class LocalGcsHelper {
27+
public class LocalStorageHelper {
2828

2929
// used for testing. Will throw if you pass it an option.
3030
private static final FakeStorageRpc instance = new FakeStorageRpc(true);

0 commit comments

Comments
 (0)