nf-test icon indicating copy to clipboard operation
nf-test copied to clipboard

Error when tests located in a path containing an "@" symbol

Open alexlyttle opened this issue 4 months ago • 0 comments

nf-test fails when tests are located in a path containing an "@" symbol.

To reproduce this issue I followed Getting Started in the nf-test docs, cloning the repo into a directory containing an @ symbol.

mkdir example@directory
cd example@directory
git clone https://github.com/askimed/nf-test-examples

After creating and modifying the test file, I attempted to run the tests,

nf-test test tests/modules/local/salmon_index.nf.test --profile docker

which outputs (personal information is masked with ***):

🚀 nf-test 0.9.0
https://www.nf-test.com
(c) 2021 - 2024 Lukas Forer and Sebastian Schoenherr

Error: java.lang.Exception: Test file '/rds/homes/l/l***/example' not found.

Background

The above example could be solved by ensuring an @ symbol is not in the path, but I won't be able to do this on my work computer. My username on my work computer contains an @ symbol because for some reason it is IT policy to make our email address our username. While @ are allowed in file paths, this is often unexpected. As such, this has lead to all manner of issues, the above being the latest!

Log file

Here is the log file (personal information is masked with ***):

Oct-04 10:27:05.008 [main] INFO  com.askimed.nf.test.App - nf-test 0.9.0
Oct-04 10:27:05.036 [main] INFO  com.askimed.nf.test.App - Arguments: [test, tests/modules/local/salmon_index.nf.test, --profile, docker]
Oct-04 10:27:13.278 [main] INFO  com.askimed.nf.test.App - Nextflow Version: 24.04.2
Oct-04 10:27:13.287 [main] INFO  com.askimed.nf.test.commands.RunTestsCommand - Load config from file /rds/homes/l/l***/example@directory/nf-test-examples/nf-test.config...
Oct-04 10:27:14.091 [main] INFO  com.askimed.nf.test.lang.dependencies.DependencyResolver - Loaded 10 files from directory /rds/homes/l/l***/example@directory/nf-test-examples in 0.224 sec
Oct-04 10:27:14.097 [main] INFO  com.askimed.nf.test.lang.dependencies.DependencyResolver - Found 1 tests.
Oct-04 10:27:14.098 [main] DEBUG com.askimed.nf.test.lang.dependencies.DependencyResolver - Found tests: [/rds/homes/l/l***/example@directory/nf-test-examples/tests/modules/local/salmon_index.nf.test]
Oct-04 10:27:14.099 [main] INFO  com.askimed.nf.test.commands.RunTestsCommand - Detected 1 test files.
Oct-04 10:27:14.111 [main] ERROR com.askimed.nf.test.commands.RunTestsCommand - Running tests failed.
java.lang.Exception: Test file '/rds/homes/l/l***/example' not found.
	at com.askimed.nf.test.core.TestSuiteResolver.parse(TestSuiteResolver.java:33)
	at com.askimed.nf.test.commands.RunTestsCommand.execute(RunTestsCommand.java:267)
	at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:43)
	at com.askimed.nf.test.commands.AbstractCommand.call(AbstractCommand.java:18)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
	at picocli.CommandLine.access$1300(CommandLine.java:145)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
	at picocli.CommandLine.execute(CommandLine.java:2078)
	at com.askimed.nf.test.App.run(App.java:39)
	at com.askimed.nf.test.App.main(App.java:46)

alexlyttle avatar Oct 04 '24 09:10 alexlyttle