Skip to content

Document test execution with local files #118

@AlexVCaron

Description

@AlexVCaron

Use-case : a collaborator wants to run tests for a module/subworkflow using local files. It is totally possible and simple to do, using the file class and the path to the files in the local filesystem, e.g. :

local_file1 = file("path/to/local/file.1")
local_file2 = file("path/to/local/file.2")

input = Channel.value( [[id: 'id'], local_file1, local_file2] )

TEST_MODULE( input )

or to only change some files in an existing test :

local_file = file("path/to/local/file.1")

LOAD_TEST_DATA ( ["archive.zip"], "test.load-test-data" )

input = LOAD_TEST_DATA.out.test_data_directory
        .map{ test_data_directory -> [
        [ id: 'id' ],
        file("${test_data_directory}/..."),
        file("${test_data_directory}/..."),
        ...
        local_file
]}

TEST_MODULE( input )

Add this to the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions