ingress-nginx-helm/rootfs/etc/nginx/lua/test/lua_ingress_test.lua
2019-01-18 10:08:33 +08:00

9 lines
345 B
Lua

describe("lua_ingress", function()
it("patches math.randomseed to not be called more than once per worker", function()
local s = spy.on(ngx, "log")
math.randomseed()
assert.spy(s).was_called_with(ngx.WARN,
string.format("ignoring math.randomseed() since PRNG is already seeded for worker %d", ngx.worker.pid()))
end)
end)