nf-core_modules/tests/modules/custom/sratoolsncbisettings/main.nf

45 lines
1.6 KiB
Text
Raw Normal View History

#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
2022-05-11 15:32:50 +00:00
include { CUSTOM_SRATOOLSNCBISETTINGS } from '../../../../modules/custom/sratoolsncbisettings/main.nf'
2022-05-11 15:32:50 +00:00
workflow test_sratoolsncbisettings_with_good_existing {
file(params.settings_path).mkdirs()
2022-05-11 12:13:50 +00:00
def settings = file(params.test_data['generic']['config']['ncbi_user_settings'], checkIfExists: true)
settings.copyTo(params.settings_file)
2022-05-11 15:32:50 +00:00
CUSTOM_SRATOOLSNCBISETTINGS()
}
2022-05-11 15:32:50 +00:00
workflow test_sratoolsncbisettings_with_bad_existing {
file(params.settings_path).mkdirs()
def settings = file(params.settings_file)
settings.text = '''
## auto-generated configuration file - DO NOT EDIT ##
config/default = "false"
/repository/remote/main/CGI/resolver-cgi = "https://trace.ncbi.nlm.nih.gov/Traces/names/names.fcgi"
/repository/remote/protected/CGI/resolver-cgi = "https://trace.ncbi.nlm.nih.gov/Traces/names/names.fcgi"
/repository/user/ad/public/apps/file/volumes/flatAd = "."
/repository/user/ad/public/apps/refseq/volumes/refseqAd = "."
/repository/user/ad/public/apps/sra/volumes/sraAd = "."
/repository/user/ad/public/apps/sraPileup/volumes/ad = "."
/repository/user/ad/public/apps/sraRealign/volumes/ad = "."
/repository/user/ad/public/apps/wgs/volumes/wgsAd = "."
/repository/user/ad/public/root = "."
/repository/user/default-path = "/root/ncbi"
'''.stripIndent()
2022-05-11 15:32:50 +00:00
CUSTOM_SRATOOLSNCBISETTINGS()
}
2022-05-11 15:32:50 +00:00
workflow test_sratoolsncbisettings_with_nonexisting {
2022-05-11 15:44:49 +00:00
def settings = file(params.settings_file)
settings.delete()
2022-05-11 15:32:50 +00:00
CUSTOM_SRATOOLSNCBISETTINGS()
}