From 3dba3947f633804b9492741826d0d21e2882e07a Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar" <19791+drernie@users.noreply.github.com> Date: Wed, 4 Sep 2024 19:45:04 -0700 Subject: [PATCH] restore Windows test --- .../src/main/nextflow/quilt/nio/QuiltFileSystemProvider.groovy | 3 ++- .../nf-quilt/src/test/nextflow/quilt/QuiltObserverTest.groovy | 3 +++ .../test/nextflow/quilt/nio/QuiltFileSystemProviderTest.groovy | 3 --- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/nf-quilt/src/main/nextflow/quilt/nio/QuiltFileSystemProvider.groovy b/plugins/nf-quilt/src/main/nextflow/quilt/nio/QuiltFileSystemProvider.groovy index 70b536dc..df63ce39 100644 --- a/plugins/nf-quilt/src/main/nextflow/quilt/nio/QuiltFileSystemProvider.groovy +++ b/plugins/nf-quilt/src/main/nextflow/quilt/nio/QuiltFileSystemProvider.groovy @@ -33,6 +33,7 @@ import java.nio.file.LinkOption import java.nio.file.NoSuchFileException import java.nio.file.OpenOption import java.nio.file.Path +import java.nio.file.Paths import java.nio.file.StandardOpenOption import java.nio.file.attribute.BasicFileAttributeView import java.nio.file.attribute.BasicFileAttributes @@ -309,7 +310,7 @@ class QuiltFileSystemProvider extends FileSystemProvider implements FileSystemTr } void checkRoot(Path path) { - if (path.toString() == '/') { + if (path == Paths.get('/')) { throw new UnsupportedOperationException("Operation 'checkRoot' not supported on root path") } } diff --git a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltObserverTest.groovy b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltObserverTest.groovy index c23b19c9..d6529f70 100644 --- a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltObserverTest.groovy +++ b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltObserverTest.groovy @@ -70,6 +70,9 @@ class QuiltObserverTest extends QuiltSpecification { where: s3_uri | quilt_uri 's3://bucket/prefix/suffix' | 'quilt+s3://bucket#package=prefix%2fsuffix' + 's3://bucket/prefix' | 'quilt+s3://bucket#package=prefix%2fdefault_suffix' + 's3://bucket' | 'quilt+s3://bucket#package=default_prefix%2fdefault_suffix' + // 's3://bucket/folder/prefix/suffix' | 'quilt+s3://bucket#package=prefix%2fsuffix&dest=folder/prefix/suffix' } void 'should findOutputParams'() { 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 402ec638..7f03c773 100644 --- a/plugins/nf-quilt/src/test/nextflow/quilt/nio/QuiltFileSystemProviderTest.groovy +++ b/plugins/nf-quilt/src/test/nextflow/quilt/nio/QuiltFileSystemProviderTest.groovy @@ -10,8 +10,6 @@ import java.nio.file.CopyOption import java.nio.file.StandardCopyOption import java.nio.file.DirectoryStream import groovy.util.logging.Slf4j -import spock.lang.IgnoreIf - /** * @@ -105,7 +103,6 @@ class QuiltFileSystemProviderTest extends QuiltSpecification { thrown java.nio.file.FileAlreadyExistsException } - @IgnoreIf({ System.getProperty('os.name').toLowerCase().contains('windows') }) void 'should throw error when checkRoot is root'() { given: QuiltFileSystemProvider provider = new QuiltFileSystemProvider()