Skip to content

Commit

Permalink
debug: verify gs filesystem is available
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyn committed Jan 26, 2021
1 parent 4b56b8e commit 8caa011
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
11 changes: 0 additions & 11 deletions google-cloud-nio/pom.xml
Expand Up @@ -176,17 +176,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependency>com.google.auto.value:auto-value</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>com.google.auto.service:auto-service</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</plugin>

</plugins>
</build>
</project>
@@ -0,0 +1 @@
com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider
Expand Up @@ -27,6 +27,8 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.spi.FileSystemProvider;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -39,6 +41,18 @@ public class CloudStorageOptionsTest {
@Before
public void before() {
CloudStorageFileSystemProvider.setStorageOptions(LocalStorageHelper.getOptions());
List<FileSystemProvider> fileSystemProviders = FileSystemProvider.installedProviders();
boolean atLeastOne = false;
for (FileSystemProvider fp : fileSystemProviders) {
if (fp.getClass() == CloudStorageFileSystemProvider.class) {
CloudStorageFileSystemProvider cloudStorageFileSystemProvider =
(CloudStorageFileSystemProvider) fp;
assertThat(cloudStorageFileSystemProvider.getProject())
.isEqualTo("dummy-project-for-testing");
atLeastOne = true;
}
}
assertThat(atLeastOne).isTrue();
}

@Test
Expand Down
1 change: 0 additions & 1 deletion pom.xml
Expand Up @@ -99,7 +99,6 @@
<artifactId>auto-value-annotations</artifactId>
<version>${auto-value-annotation.version}</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down

0 comments on commit 8caa011

Please sign in to comment.