-
Notifications
You must be signed in to change notification settings - Fork 651
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22a0ff3
commit 8dc0adf
Showing
7 changed files
with
107 additions
and
19 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
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
45 changes: 45 additions & 0 deletions
45
modules/nf-amazon/src/test/nextflow/cloud/aws/util/S3PathTest.groovy
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,45 @@ | ||
package nextflow.cloud.aws.util | ||
|
||
import nextflow.file.FileHelper | ||
import spock.lang.Specification | ||
import spock.lang.Unroll | ||
|
||
/** | ||
* | ||
* @author Paolo Di Tommaso <paolo.ditommaso@gmail.com> | ||
*/ | ||
class S3PathTest extends Specification { | ||
|
||
@Unroll | ||
def 'should convert to uri string' () { | ||
|
||
expect: | ||
FileHelper.asPath(PATH).toUriString() == STR | ||
|
||
where: | ||
_ | PATH | STR | ||
_ | 's3://foo' | 's3://foo/' | ||
_ | 's3://foo/bar' | 's3://foo/bar' | ||
_ | 's3://foo/b a r' | 's3://foo/b a r' | ||
_ | 's3://f o o/bar' | 's3://f o o/bar' | ||
_ | 's3://f_o_o/bar' | 's3://f_o_o/bar' | ||
|
||
} | ||
|
||
@Unroll | ||
def 'should convert to string' () { | ||
|
||
expect: | ||
FileHelper.asPath(PATH).toString() == STR | ||
|
||
where: | ||
_ | PATH | STR | ||
_ | 's3://foo' | '/foo/' | ||
_ | 's3://foo/bar' | '/foo/bar' | ||
_ | 's3://foo/b a r' | '/foo/b a r' | ||
_ | 's3://f o o/bar' | '/f o o/bar' | ||
_ | 's3://f_o_o/bar' | '/f_o_o/bar' | ||
|
||
} | ||
|
||
} |
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
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