cleanup lua tests
This commit is contained in:
parent
fe9bb6bee5
commit
fcaf337b30
13 changed files with 4 additions and 67 deletions
|
|
@ -1,25 +1,5 @@
|
|||
package.path = "./rootfs/etc/nginx/lua/?.lua;./rootfs/etc/nginx/lua/test/mocks/?.lua;" .. package.path
|
||||
_G._TEST = true
|
||||
local cjson = require('cjson')
|
||||
|
||||
local function udp_mock()
|
||||
return {
|
||||
setpeername = function(...) return true end,
|
||||
send = function(payload) return payload end,
|
||||
close = function(...) return true end
|
||||
}
|
||||
end
|
||||
|
||||
local _ngx = {
|
||||
shared = {},
|
||||
log = function(...) end,
|
||||
socket = {
|
||||
udp = udp_mock
|
||||
},
|
||||
get_phase = function() return "timer" end,
|
||||
var = {}
|
||||
}
|
||||
_G.ngx = _ngx
|
||||
local cjson = require("cjson")
|
||||
|
||||
describe("Monitor", function()
|
||||
local monitor = require("monitor")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue