mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-03 16:44:05 +00:00
fix exit status
This commit is contained in:
parent
182b3eec6c
commit
971dadda46
@ -157,15 +157,15 @@ proc duration(manager: TestManager): Duration =
|
||||
let now = Moment.now()
|
||||
(manager.timeEnd |? now) - (manager.timeStart |? now)
|
||||
|
||||
proc testsStatus*(manager: TestManager): ?!bool =
|
||||
proc allTestsPassed*(manager: TestManager): ?!bool =
|
||||
for test in manager.tests:
|
||||
if test.status in {IntegrationTestStatus.New, IntegrationTestStatus.Running}:
|
||||
return failure "Integration tests not complete"
|
||||
|
||||
if test.status != IntegrationTestStatus.Ok:
|
||||
return success true
|
||||
return success false
|
||||
|
||||
return success false
|
||||
return success true
|
||||
|
||||
proc duration(test: IntegrationTest): Duration =
|
||||
let now = Moment.now()
|
||||
|
@ -72,7 +72,7 @@ proc run() {.async.} =
|
||||
trace "stopping test manager"
|
||||
await manager.stop()
|
||||
|
||||
without wasSuccessful =? manager.testsStatus, error:
|
||||
without wasSuccessful =? manager.allTestsPassed, error:
|
||||
raiseAssert "Failed to get test status: " & error.msg
|
||||
|
||||
if not wasSuccessful:
|
||||
|
Loading…
x
Reference in New Issue
Block a user