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 d4cd678
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 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>
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

0 comments on commit d4cd678

Please sign in to comment.