test(runtime/health): cover lua healthchecks

- Add tests for lua healthchecks (failure, success and submodules).
- Reword some of the test naming for improved logs readability.
- Modify render test to accomodate the changes of the health autoload function.
- Add test for :checkhealth completion of Lua healtchecks.
This commit is contained in:
Javier López
2021-08-03 16:09:26 -05:00
parent 9249dcdda1
commit c65f956015
5 changed files with 159 additions and 39 deletions

View File

@@ -0,0 +1,11 @@
local M = {}
local health = require("health")
M.check = function()
health.report_start("report 1")
health.report_ok("everything is fine")
health.report_start("report 2")
health.report_ok("nothing to see here")
end
return M

View File

@@ -0,0 +1,11 @@
local M = {}
local health = require("health")
M.check = function()
health.report_start("report 1")
health.report_ok("everything is fine")
health.report_start("report 2")
health.report_ok("nothing to see here")
end
return M

View File

@@ -0,0 +1,12 @@
local M = {}
local health = require("health")
M.check = function()
health.report_start("report 1")
health.report_ok("everything is fine")
health.report_warn("About to add a number to nil")
local a = nil + 2
return a
end
return M