Skip to content

Top level validate function broken for Path type schema signature #169

@awgymer

Description

@awgymer

The top level ValidationExtension.validate method with the Path schema signature has no current tests but it is broken:

@Function
   List<String> validate(
       final Map options = [:],
       final Object input,
       final Path schema
   ) {
       return validate(input, schema.toUri(), options)
   }

options needs to be the first parameter. However this raises another issue as toUri returns a URI object and not a string.

When I then try to use toUri().toString() I get a failing test as the path seems to be improperly resolved:

/tmp/test8497693594181044640/file:/Users/arthurgymer/workbench/nf-core/nf-schema/src/testResources/nextflow_schema_nested_parameters.json

It seems that the tmpdir is being injected in front of the real path and this is breaking things. I am not sure if this is an issue isolated to the test framework. I am not sure how to resolve this and get a working test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions