Skip to content

Commit

Permalink
test findQuiltPath preserves metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Oct 2, 2024
1 parent ac173c5 commit d2b71db
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions plugins/nf-quilt/src/test/nextflow/quilt/QuiltPathifyTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d2b71db

Please sign in to comment.