You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quite common we need to validate behaviour by checking log files. Some helper assertions would be nice.
Issues:
applications don't always restart with clean logs in-between tests; so a start marker would be necessary
log file might not exist when start marker is called?
assertions for "contains"
needs filename where to look
locallogfile=require"luassert.logfile"it("checks a log file", function()
locallog=logfile("./logs/error.log") -- sets a start marker (file size?), should not fail if file doesn't exist-- do stuff assert.logfile(log).exists()
assert.logfile(log).contains("some Lua pattern", [occurrences])
end)
The text was updated successfully, but these errors were encountered:
Quite common we need to validate behaviour by checking log files. Some helper assertions would be nice.
Issues:
The text was updated successfully, but these errors were encountered: