Skip to content

Commit

Permalink
Correct the integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
tkan145 committed Nov 24, 2023
1 parent 26edbf7 commit 5bda7fc
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions t/apicast-policy-request-unbuffered.t
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ server_name test-upstream.lvh.me;
--- response_body eval chomp
$ENV{LARGE_BODY}
--- error_code: 200
--- grep_error_log
a client request body is buffered to a temporary file
--- grep_error_log eval
qr/a client request body is buffered to a temporary file/
--- grep_error_log_out
a client request body is buffered to a temporary file
--- no_error_log
[error]

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

-- Nginx will read the entire body in one chunk, the upstream request will not be chunked
-- and Content-Length header will be added.
Expand All @@ -116,6 +116,8 @@ server_name test-upstream.lvh.me;
assert.equal('12', content_length)
assert.falsy(encoding, "chunked")
}
echo_read_request_body;
echo_request_body;
}
--- more_headers
Transfer-Encoding: chunked
Expand All @@ -128,6 +130,8 @@ world\r
0\r
\r
"
--- response_body chomp
hello, world
--- error_code: 200
--- no_error_log
[error]
Expand Down Expand Up @@ -203,8 +207,9 @@ $s
--- response_body eval
$::data
--- error_code: 200
--- grep_error_log
a client request body is buffered to a temporary file
--- grep_error_log eval
qr/a client request body is buffered to a temporary file/
--- grep_error_log_out
a client request body is buffered to a temporary file
--- no_error_log
[error]

0 comments on commit 5bda7fc

Please sign in to comment.