From c65f9560155a8f37b1a2fe15e1bdbebe191fc494 Mon Sep 17 00:00:00 2001 From: Javier López Date: Tue, 3 Aug 2021 16:09:26 -0500 Subject: 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. --- .../fixtures/lua/test_plug/submodule_failed/health.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/functional/fixtures/lua/test_plug/submodule_failed/health.lua (limited to 'test/functional/fixtures/lua/test_plug/submodule_failed') diff --git a/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua b/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua new file mode 100644 index 0000000000..3a8af6ebb2 --- /dev/null +++ b/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua @@ -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 -- cgit