Skip to content

Commit

Permalink
core.engine: Enable selftest() method
Browse files Browse the repository at this point in the history
The selftest method has been suppressed in a previous change. It seems
better to run it and for all available features (including those not
enabled by default).

Currently fails in the app restart-on-error part of the tests. This
feature is not currently enabled by default but it should still be
working and tested.
  • Loading branch information
lukego committed Sep 30, 2015
1 parent 6c0545d commit 30a9b34
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/core/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,6 @@ function report_apps ()
end

function selftest ()
if not use_restart then
print("with_restart disabled\nTest skipped")
os.exit(test_skipped_code)
end
print("selftest: app")
local App = {}
function App:new () return setmetatable({}, {__index = App}) end
Expand Down Expand Up @@ -446,6 +442,7 @@ function selftest ()
assert(#app_array == 0)
assert(#link_array == 0)
-- Test app restarts on failure.
use_restart = true
print("c_fail")
local App1 = {zone="test"}
function App1:new () return setmetatable({}, {__index = App1}) end
Expand Down

0 comments on commit 30a9b34

Please sign in to comment.