Skip to content

Commit eeca371

Browse files
committed
Try fixing tests
1 parent 1b736bf commit eeca371

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

t/024-access/sanity.t

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
use Test::Nginx::Socket::Lua::Stream;
33
#worker_connections(1014);
44
#no_nginx_manager();
5-
log_level('debug');
5+
#log_level('debug');
66
#master_on();
77

88
repeat_each(2);
99

10-
plan tests => repeat_each() * (blocks() * 2 + 3);
10+
plan tests => repeat_each() * (blocks() * 2);
1111

1212
#no_diff();
1313
#no_long_string();

t/132-lua-blocks.t

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use Test::Nginx::Socket::Lua::Stream;
99
repeat_each(2);
1010
#repeat_each(1);
1111

12-
plan tests => repeat_each() * ((blocks() * 3) + 1);
12+
plan tests => repeat_each() * ((blocks() * 3) + 3);
1313

1414
#no_diff();
1515
no_long_string();
@@ -208,12 +208,11 @@ close: 1 nil
208208
}
209209
--- stream_server_config
210210
access_by_lua_block {
211-
local s = ngx.var.a
212-
s = s .. '}access{\n'
213-
ngx.var.a = s
211+
local s = '}access{\n'
212+
ngx.ctx.a = s
214213
}
215214
content_by_lua_block {
216-
s = [[}content{]]
215+
local s = ngx.ctx.a .. [[}content{]]
217216
ngx.ctx.a = s
218217
ngx.say(s)
219218
ngx.say("glob: ", glob)
@@ -224,6 +223,7 @@ close: 1 nil
224223
225224
--- config
226225
--- stream_response
226+
}access{
227227
}content{
228228
glob: init by lua }here{, init worker }here{
229229

0 commit comments

Comments
 (0)