diff --git a/plugins/nf-quilt/src/test/nextflow/quilt/nio/QuiltFileSystemProviderTest.groovy b/plugins/nf-quilt/src/test/nextflow/quilt/nio/QuiltFileSystemProviderTest.groovy index b9e02856..6344c463 100644 --- a/plugins/nf-quilt/src/test/nextflow/quilt/nio/QuiltFileSystemProviderTest.groovy +++ b/plugins/nf-quilt/src/test/nextflow/quilt/nio/QuiltFileSystemProviderTest.groovy @@ -6,6 +6,8 @@ import groovy.transform.CompileDynamic import java.nio.file.Path import java.nio.file.Paths import java.nio.file.Files +import java.nio.file.CopyOption +import java.nio.file.StandardCopyOption import groovy.util.logging.Slf4j import spock.lang.IgnoreIf @@ -45,4 +47,18 @@ class QuiltFileSystemProviderTest extends QuiltSpecification { Files.size(tempFile) > 0 } + void 'should download folders from remote to local destination'() { + given: + QuiltFileSystemProvider provider = new QuiltFileSystemProvider() + Path remoteFolder = Paths.get('quilt+s3://quilt-example#package=examples%2fhurdat2') + Path tempFolder = Files.createTempDirectory('quilt') + CopyOption opt = StandardCopyOption.REPLACE_EXISTING + when: + provider.download(remoteFolder, tempFolder, opt) + + then: + Files.exists(tempFolder) + Files.list(tempFolder).count() > 0 + } + }