mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-08 00:13:08 +00:00
fix exit status
This commit is contained in:
parent
60b36044b2
commit
943b552e5f
@ -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