Open jfy133 opened 1 month ago
For simple cases, I think this can actually be done without any new functions using groovy to iterate the files returned by the existing getAllFilesFromDir
and the existing nf-test file support:
then {
def files = getAllFilesFromDir(...)
files.each { file ->
assert file.text.contains('SUCCESSFUL RUN')
}
}
@TCLamnidis Tom wrote a load of code, and then deleted it because apparently a whole separate function might be overkill... maybe you can try the above with the eager tests?
Currently there are two helper methods for checking output files:
While the of unstability fallback is good e.g. binary files, it's not as good as checking inside a file for consistent contents (E.g. when maybe it's only a single timestamp inside the file is unstable).
An intermediate check is to check for certain strings, e.g. maybe 'SUCCESSFUL RUN' at the end of a log.
It would be nice to have a function that does the same as the two existing methods, but with the string checking functionality.