Skip to content

Commit

Permalink
Fix snapshotting
Browse files Browse the repository at this point in the history
  • Loading branch information
pinin4fjords committed Nov 29, 2023
1 parent e04c3e9 commit 65a221b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
8 changes: 5 additions & 3 deletions modules/local/seqera_runs_dump/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ nextflow_process {
}

then {
def dumpFiles = path(process.out.run_dump.get(0).get(1)).toFile().listFiles().sort()
def dumpFiles = file(process.out.run_dump.get(0).get(1)).listFiles()

assertAll(
{ assert snapshot(process.out.workflow_json).match() },
{ assert snapshot(workflow, dumpFiles.findAll { ! it.name.matches('workflow-launch.json')}).match()},
{ assert snapshot(
dumpFiles.grep { file -> ! file.name.matches("workflow-launch.json") },
process.out.workflow_json
).match()},
{ assert dumpFiles.find { it.name.matches('workflow-launch.json')}.exists()},
{ assert process.success }
)
Expand Down
36 changes: 14 additions & 22 deletions modules/local/seqera_runs_dump/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
{
"Should run without failures": {
"content": [
{
"stderr": [

],
"errorReport": null,
"exitStatus": 0,
"failed": false,
"stdout": [

],
"errorMessage": null,
"trace": {
"tasksFailed": 0,
"tasksCount": 1,
"tasksSucceeded": 1
},
"name": "workflow",
"success": true
},
[
"service-info.json:md5,0a2624c21efb65b85e37fa3d07903dcc",
"workflow-load.json:md5,4f02d5a24ab89aa648cd4346785c8f2c",
"workflow-metrics.json:md5,70dd1af37145c8c2d23836fe850622e7",
"workflow-tasks.json:md5,577a7472816b7729012a9291d97ff150",
"workflow.json:md5,34db0e39f0246670eac77c7a5e9093c9"
"workflow.json:md5,34db0e39f0246670eac77c7a5e9093c9",
"service-info.json:md5,0a2624c21efb65b85e37fa3d07903dcc"
],
[
[
{
"id": "4Bi5xBK6E2Nbhj",
"workspace": "community/showcase",
"runName": "crazy_wiles",
"workDir": "s3://nf-tower-bucket/scratch/4Bi5xBK6E2Nbhj"
},
"workflow.json:md5,34db0e39f0246670eac77c7a5e9093c9"
]
]
],
"timestamp": "2023-11-28T17:27:26.539517301"
"timestamp": "2023-11-29T10:13:31.623951214"
}
}

0 comments on commit 65a221b

Please sign in to comment.