From eeca3715a55786ae7d6d9f26438aead5bcbb693c Mon Sep 17 00:00:00 2001 From: Arcadiy Ivanov Date: Mon, 9 Nov 2020 22:49:28 -0500 Subject: [PATCH] Try fixing tests --- t/024-access/sanity.t | 4 ++-- t/132-lua-blocks.t | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/t/024-access/sanity.t b/t/024-access/sanity.t index 4e1263e4..1c88b8f4 100644 --- a/t/024-access/sanity.t +++ b/t/024-access/sanity.t @@ -2,12 +2,12 @@ use Test::Nginx::Socket::Lua::Stream; #worker_connections(1014); #no_nginx_manager(); -log_level('debug'); +#log_level('debug'); #master_on(); repeat_each(2); -plan tests => repeat_each() * (blocks() * 2 + 3); +plan tests => repeat_each() * (blocks() * 2); #no_diff(); #no_long_string(); diff --git a/t/132-lua-blocks.t b/t/132-lua-blocks.t index 52c5917c..973b56ce 100644 --- a/t/132-lua-blocks.t +++ b/t/132-lua-blocks.t @@ -9,7 +9,7 @@ use Test::Nginx::Socket::Lua::Stream; repeat_each(2); #repeat_each(1); -plan tests => repeat_each() * ((blocks() * 3) + 1); +plan tests => repeat_each() * ((blocks() * 3) + 3); #no_diff(); no_long_string(); @@ -208,12 +208,11 @@ close: 1 nil } --- stream_server_config access_by_lua_block { - local s = ngx.var.a - s = s .. '}access{\n' - ngx.var.a = s + local s = '}access{\n' + ngx.ctx.a = s } content_by_lua_block { - s = [[}content{]] + local s = ngx.ctx.a .. [[}content{]] ngx.ctx.a = s ngx.say(s) ngx.say("glob: ", glob) @@ -224,6 +223,7 @@ close: 1 nil --- config --- stream_response +}access{ }content{ glob: init by lua }here{, init worker }here{