planemo icon indicating copy to clipboard operation
planemo copied to clipboard

Fail test if tool writes to input dir

Open bernt-matthias opened this issue 4 years ago • 1 comments
trafficstars

Would be nice if planemo test would fail for such cases automatically. Like so https://github.com/galaxyproject/tools-iuc/pull/3986#issuecomment-926729276

bernt-matthias avatar Sep 24 '21 15:09 bernt-matthias

Alternatively we could do the following in the CI:

FILE_PATH=$(mktemp -d)
planemo test --file_path $FILEPATH ...

WROTE=$(find $FILE_PATH -type f \( ! -name "*.dat" ! -name "dataset_.*_files" \))

if [[ $WROTE ]]; then
    >&2 echo "tool wrote files into Galaxy's file dir: "
    >&2 echo $WROTE
    exit 1
fi

bernt-matthias avatar Sep 24 '21 17:09 bernt-matthias

Closing this, since containerized testing allows to do this. Still I leave https://github.com/galaxyproject/planemo/pull/1190 open, because it might have value .. but others need to judge this.

bernt-matthias avatar Nov 17 '22 13:11 bernt-matthias