From d2b71dbfb7d57eafecb5a28438d6c2c1f0748544 Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar" <19791+drernie@users.noreply.github.com> Date: Tue, 1 Oct 2024 21:08:42 -0700 Subject: [PATCH] test findQuiltPath preserves metadata --- .../test/nextflow/quilt/QuiltPathifyTest.groovy | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltPathifyTest.groovy b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltPathifyTest.groovy index 6806bec..8623136 100644 --- a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltPathifyTest.groovy +++ b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltPathifyTest.groovy @@ -38,8 +38,7 @@ class QuiltPathifyTest extends QuiltSpecification { final static private String DS = 'default_suffix' final static private String DB = QuiltParser.NULL_BUCKET - QuiltPathify getPathify() { - String uri = SpecURI() + QuiltPathify getPathify(String uri = SpecURI()) { QuiltPath path = QuiltPathFactory.parse(uri) QuiltPathify pathify = new QuiltPathify(path) return pathify @@ -101,6 +100,17 @@ class QuiltPathifyTest extends QuiltSpecification { pathify.pkgKey() == 'buck#package=prefix%2fsuffix' } + void 'test findQuiltPath preserves metadata'() { + when: + String pathWithout = 'bucket#package=prefix%2fsuffix&path=FILE.md' + String pathWith = pathWithout.replace('#', '?key=value#') + String uriWith = "quilt+s3://${pathWith}" + QuiltPathify pathify = getPathify(uriWith) + + then: + pathify.uri == uriWith + } + // Test findQuiltPath.getRoot() retrieves metadata from prior package // Test makeQuiltPath creates new uri/path/pkg // Test makeQuiltPath sets isOverlay