Skip to content

Commit 5bda7fc

Browse files
committed
Correct the integration test
1 parent 26edbf7 commit 5bda7fc

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

t/apicast-policy-request-unbuffered.t

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ server_name test-upstream.lvh.me;
6161
--- response_body eval chomp
6262
$ENV{LARGE_BODY}
6363
--- error_code: 200
64-
--- grep_error_log
65-
a client request body is buffered to a temporary file
64+
--- grep_error_log eval
65+
qr/a client request body is buffered to a temporary file/
6666
--- grep_error_log_out
67+
a client request body is buffered to a temporary file
6768
--- no_error_log
6869
[error]
6970

@@ -107,7 +108,6 @@ server_name test-upstream.lvh.me;
107108
location / {
108109
access_by_lua_block {
109110
assert = require('luassert')
110-
ngx.say("yay, api backend")
111111

112112
-- Nginx will read the entire body in one chunk, the upstream request will not be chunked
113113
-- and Content-Length header will be added.
@@ -116,6 +116,8 @@ server_name test-upstream.lvh.me;
116116
assert.equal('12', content_length)
117117
assert.falsy(encoding, "chunked")
118118
}
119+
echo_read_request_body;
120+
echo_request_body;
119121
}
120122
--- more_headers
121123
Transfer-Encoding: chunked
@@ -128,6 +130,8 @@ world\r
128130
0\r
129131
\r
130132
"
133+
--- response_body chomp
134+
hello, world
131135
--- error_code: 200
132136
--- no_error_log
133137
[error]
@@ -203,8 +207,9 @@ $s
203207
--- response_body eval
204208
$::data
205209
--- error_code: 200
206-
--- grep_error_log
207-
a client request body is buffered to a temporary file
210+
--- grep_error_log eval
211+
qr/a client request body is buffered to a temporary file/
208212
--- grep_error_log_out
213+
a client request body is buffered to a temporary file
209214
--- no_error_log
210215
[error]

0 commit comments

Comments
 (0)