Skip to content

Commit

Permalink
[t] Fix failed tests in apicast-policy-3scale-batcher.t
Browse files Browse the repository at this point in the history
Previously context.apply() is set in PR#1038. Due to ctx_ref
is nil in the test, the context also has nil value. However in
openresty 1.21.4 set ngx.ctx to a non-table value is considered
harmful and will return error. Therefore, we need to remove
context.apply() from the test.

Ref: openresty/lua-resty-core#333
  • Loading branch information
tkan145 committed May 1, 2024
1 parent 37dbe50 commit f8f8017
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions t/apicast-policy-3scale-batcher.t
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ auth cache on every request (see rewrite_by_lua_block).
--- upstream env
location /api-backend {
rewrite_by_lua_block {
require('resty.ctx').apply()
ngx.shared.cached_auths:flush_all()
}
echo 'yay, api backend';
Expand Down Expand Up @@ -583,7 +582,6 @@ auth cache on every request (see rewrite_by_lua_block).
--- upstream env
location /api-backend {
rewrite_by_lua_block {
require('resty.ctx').apply()
ngx.shared.cached_auths:flush_all()
}
echo 'yay, api backend';
Expand Down

0 comments on commit f8f8017

Please sign in to comment.