27 lines
1,014 B
Lua
27 lines
1,014 B
Lua
local lust = require 'test/lust'
|
|
local describe, it, expect = lust.describe, lust.it, lust.expect
|
|
-- usage: https://github.com/bjornbytes/lust
|
|
|
|
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)
|
|
require('test/plugin_git')(lust)
|
|
require('test/plugin_diskscan')(lust)
|
|
require('test/plugin_xrfragment')(lust)
|
|
|
|
if lust.errors == 0 then
|
|
print("✅ all tests passed")
|
|
else
|
|
print("[!] some tests failed")
|
|
print("errors: " .. lust.errors .. " :(")
|
|
end
|
|
os.exit(lust.errors)
|