80 lines
5.2 KiB
Plaintext
80 lines
5.2 KiB
Plaintext
✔ isRunId accepts the run id shape and nothing else (1.81962ms)
|
||
✔ a missing data root or runs directory lists nothing (2.134922ms)
|
||
✔ runs as a regular file lists nothing, as before (1.482977ms)
|
||
✔ listRunIds keeps r- names only, sorted oldest first (1.523512ms)
|
||
✔ listRunRecords returns each result, or null for an incomplete or unreadable one (2.405926ms)
|
||
✔ readRunRecord returns documents and artifacts in directory order (1.274728ms)
|
||
✔ readRunRecord is null for a missing run, a dangling link or a file (0.784894ms)
|
||
✔ readRunRecord and readRunDocument refuse an invalid run id before touching the disk (0.80405ms)
|
||
✔ readRunDocument reads only the three run documents (0.690033ms)
|
||
✔ a link inside the data root is followed (1.69734ms)
|
||
✔ a data root that is itself a link is trusted as configured (0.717603ms)
|
||
✔ a run directory linked out of the data root is never read (0.781243ms)
|
||
✔ a document linked out of the data root reads as null (1.167486ms)
|
||
✔ a runs directory linked out of the data root refuses (0.646654ms)
|
||
✔ a relative link that climbs out of the data root refuses (0.546468ms)
|
||
✔ a sibling whose name starts with the data root's name is outside it (0.657202ms)
|
||
✔ a link loop refuses instead of reading as missing (0.666052ms)
|
||
✔ an unreadable runs directory refuses instead of listing nothing (0.462925ms)
|
||
✔ an unreadable run directory refuses instead of reading as missing (1.309791ms)
|
||
✔ a link to the data root's parent is outside it (0.472631ms)
|
||
✔ listRunIds sorts whatever order the directory returns (0.851919ms)
|
||
✔ listRunRecords lists an r- name that isn't a valid run id, as before (0.580399ms)
|
||
✔ the readers write nothing (2.188829ms)
|
||
✔ no pointer is null (2.01241ms)
|
||
✔ the pointer release.sh writes reads back (1.63017ms)
|
||
✔ a pointer that isn't the version 1 shape refuses with exit 2 (2.047479ms)
|
||
✔ a pointer that is a directory refuses with exit 4 (0.711759ms)
|
||
✔ a state file linked out of the data root refuses (1.921301ms)
|
||
✔ a state directory linked out of the data root refuses (0.698342ms)
|
||
✔ a state directory linked out to nothing reads as no release and an empty log (0.557745ms)
|
||
✔ a missing log is empty (0.403928ms)
|
||
✔ the log reads oldest first and counts malformed lines (1.103969ms)
|
||
✔ last must be a positive integer (0.500743ms)
|
||
✔ the state readers write nothing (0.863101ms)
|
||
✔ list prints each run in the established format (86.425618ms)
|
||
✔ list prints a damaged result.json as unknown and keeps listing the runs after it (80.50387ms)
|
||
✖ list prints each result field that isn't a string as unknown or - (80.786636ms)
|
||
✔ show prints the run in the established format (78.733318ms)
|
||
✔ show of a missing run and an invalid id exit 4 as before (140.176796ms)
|
||
✔ list and show refuse a runs directory linked out of the data root (153.927205ms)
|
||
✔ show refuses a run linked out of the data root; list reports it unknown (161.468469ms)
|
||
✔ list shows an r- name that isn't a valid run id, as before (81.637218ms)
|
||
✔ show refuses an invalid id before reading the config (46.583449ms)
|
||
ℹ tests 43
|
||
ℹ suites 0
|
||
ℹ pass 42
|
||
ℹ fail 1
|
||
ℹ cancelled 0
|
||
ℹ skipped 0
|
||
ℹ todo 0
|
||
ℹ duration_ms 994.889694
|
||
|
||
✖ failing tests:
|
||
|
||
test at packages/runs/tests/task-cli.test.mjs:49:1
|
||
✖ list prints each result field that isn't a string as unknown or - (80.786636ms)
|
||
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
|
||
+ actual - expected
|
||
|
||
'r-20260101T000000Z-status unknown task=t-one ws=- session=-\n' +
|
||
'r-20260101T000001Z-taskid succeeded task=- ws=- session=-\n' +
|
||
'r-20260101T000002Z-worksp succeeded task=t-one ws=- session=-\n' +
|
||
+ 'r-20260101T000003Z-sessin succeeded task=t-one ws=- session=[object Object]\n'
|
||
- 'r-20260101T000003Z-sessin succeeded task=t-one ws=- session=-\n'
|
||
|
||
at TestContext.<anonymous> (file:///mnt/storage/scratch/rocko-r82/packages/runs/tests/task-cli.test.mjs:60:10)
|
||
at Test.runInAsyncScope (node:async_hooks:226:14)
|
||
at Test.run (node:internal/test_runner/test:1402:25)
|
||
at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
|
||
at Test.postRun (node:internal/test_runner/test:1542:19)
|
||
at Test.run (node:internal/test_runner/test:1467:12)
|
||
at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
|
||
generatedMessage: true,
|
||
code: 'ERR_ASSERTION',
|
||
actual: 'r-20260101T000000Z-status unknown task=t-one ws=- session=-\nr-20260101T000001Z-taskid succeeded task=- ws=- session=-\nr-20260101T000002Z-worksp succeeded task=t-one ws=- session=-\nr-20260101T000003Z-sessin succeeded task=t-one ws=- session=[object Object]\n',
|
||
expected: 'r-20260101T000000Z-status unknown task=t-one ws=- session=-\nr-20260101T000001Z-taskid succeeded task=- ws=- session=-\nr-20260101T000002Z-worksp succeeded task=t-one ws=- session=-\nr-20260101T000003Z-sessin succeeded task=t-one ws=- session=-\n',
|
||
operator: 'strictEqual',
|
||
diff: 'simple'
|
||
}
|