Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport 2.13 lua check client abort #1421

Merged
merged 12 commits into from
Nov 2, 2023
Prev Previous commit
Next Next commit
fix busted tests: spec/policy/apicast/apicast_spec.lua
  • Loading branch information
eguzki committed Nov 2, 2023
commit ca26bb9691d9201bee3d99924827f81a8260ea76
10 changes: 10 additions & 0 deletions spec/policy/apicast/apicast_spec.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
local _M = require 'apicast.policy.apicast'

describe('APIcast policy', function()
local ngx_on_abort_stub

before_each(function()
-- .access calls ngx.on_abort
-- busted tests are called in the context of ngx.timer
-- and that API ngx.on_abort is disabled in that context.
-- this stub is mocking the call
-- to prevent the internal error: API disabled in the context of ngx.timer
ngx_on_abort_stub = stub(ngx, 'on_abort')
end)

it('has a name', function()
assert.truthy(_M._NAME)
Expand Down
Loading