2026-07-23 21:34:09 +02:00
|
|
|
local lust = require 'test/lust'
|
|
|
|
|
local describe, it, expect = lust.describe, lust.it, lust.expect
|
|
|
|
|
-- usage: https://github.com/bjornbytes/lust
|
|
|
|
|
|
2026-08-10 13:16:30 +02:00
|
|
|
lust.queueServerRequest = function(method, path, params, host, headers, body, scheme, port)
|
|
|
|
|
GetMethod = function() return method end
|
|
|
|
|
GetPath = function() return path end
|
|
|
|
|
GetParams = function() return params or {} end -- note: { {"key","value"} } format
|
|
|
|
|
GetHost = function() return host or 'localhost' end
|
|
|
|
|
GetHeaders = function() return headers or {} end
|
|
|
|
|
GetScheme = function() return scheme or 'https' end
|
|
|
|
|
GetBody = function() return body or '' end
|
|
|
|
|
GetPort = function() return port or 80 end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
require('test/plugin_global')(lust)
|
|
|
|
|
os.exit()
|
2026-07-24 17:06:31 +02:00
|
|
|
require('test/plugin_diskscan')(lust)
|
2026-08-06 16:43:17 +02:00
|
|
|
require('test/plugin_xrfragment')(lust)
|
2026-07-23 21:34:09 +02:00
|
|
|
|
|
|
|
|
if lust.errors == 0 then
|
|
|
|
|
print("✅ all tests passed")
|
|
|
|
|
else
|
|
|
|
|
print("[!] some tests failed")
|
|
|
|
|
print("errors: " .. lust.errors .. " :(")
|
|
|
|
|
end
|
|
|
|
|
os.exit(lust.errors)
|