Skip to content

Commit

Permalink
pass copyDirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Sep 3, 2024
1 parent b0e5368 commit 027d291
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
}

}

0 comments on commit 027d291

Please sign in to comment.