-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update google-cloud-nio to support underscores in bucket names
- Loading branch information
Showing
5 changed files
with
74 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package picard.nio; | ||
|
||
import org.testng.annotations.DataProvider; | ||
import org.testng.annotations.Test; | ||
|
||
import org.testng.Assert; | ||
|
||
import java.net.URI; | ||
import java.nio.file.Path; | ||
import java.nio.file.Paths; | ||
|
||
public class GATKBucketUtilsTest { | ||
|
||
@DataProvider | ||
public Object[][] getVariousPathsForPrefetching(){ | ||
return new Object[][]{ | ||
{"file:///local/file", false}, | ||
{"gs://abucket/bucket", true}, | ||
{"gs://abucket_with_underscores", true}, | ||
}; | ||
} | ||
|
||
@Test(groups="bucket", dataProvider = "getVariousPathsForPrefetching") | ||
public void testIsEligibleForPrefetching(String path, boolean isPrefetchable){ | ||
final URI uri = URI.create(path); | ||
final Path uriPath = Paths.get(uri); | ||
Assert.assertEquals(GATKBucketUtils.isEligibleForPrefetching(uriPath), isPrefetchable); | ||
} | ||
} |