Remove 3rd party lua plugin support (#11821)

This commit is contained in:
Ricardo Katz 2024-08-21 10:54:29 -03:00 committed by GitHub
parent bfd65d6c59
commit 3bec99ecfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 2 additions and 258 deletions

View file

@ -1,23 +0,0 @@
describe("plugins", function()
describe("#run", function()
it("runs the plugins in the given order", function()
ngx.get_phase = function() return "rewrite" end
local plugins = require("plugins")
local called_plugins = {}
local plugins_to_mock = {"plugins.pluginfirst.main", "plugins.pluginsecond.main", "plugins.pluginthird.main"}
for i=1, 3, 1
do
package.loaded[plugins_to_mock[i]] = {
rewrite = function()
called_plugins[#called_plugins + 1] = plugins_to_mock[i]
end
}
end
assert.has_no.errors(function()
plugins.init({"pluginfirst", "pluginsecond", "pluginthird"})
end)
assert.has_no.errors(plugins.run)
assert.are.same(plugins_to_mock, called_plugins)
end)
end)
end)