Skip to content

Commit 4c943b9

Browse files
committed
tests: 087-udp-socket.t: removed a duplicated test case.
1 parent 70484bc commit 4c943b9

File tree

1 file changed

+1
-58
lines changed

1 file changed

+1
-58
lines changed

t/087-udp-socket.t

+1-58
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use Test::Nginx::Socket::Lua;
44

55
repeat_each(2);
66

7-
plan tests => repeat_each() * (3 * blocks() + 14);
7+
plan tests => repeat_each() * (3 * blocks() + 13);
88

99
our $HtmlDir = html_dir;
1010

@@ -1006,63 +1006,6 @@ qr/runtime error: content_by_lua\(nginx\.conf:\d+\):14: bad request/
10061006
#set $port 5000;
10071007
set $port $TEST_NGINX_MEMCACHED_PORT;
10081008

1009-
content_by_lua '
1010-
local test = require "test"
1011-
if ngx.var.arg_reset then
1012-
local sock = test.new_sock()
1013-
local ok, err = sock:setpeername("127.0.0.1", ngx.var.port)
1014-
if not ok then
1015-
ngx.say("failed to set peer: ", err)
1016-
else
1017-
ngx.say("peer set")
1018-
end
1019-
return
1020-
end
1021-
local sock = test.get_sock()
1022-
sock:send("a")
1023-
';
1024-
}
1025-
--- user_files
1026-
>>> test.lua
1027-
module("test", package.seeall)
1028-
1029-
local sock
1030-
1031-
function new_sock()
1032-
sock = ngx.socket.udp()
1033-
return sock
1034-
end
1035-
1036-
function get_sock()
1037-
return sock
1038-
end
1039-
--- request
1040-
GET /main
1041-
--- response_body_like eval
1042-
qr/^peer set
1043-
<html.*?500 Internal Server Error/ms
1044-
1045-
--- error_log eval
1046-
qr/runtime error: content_by_lua\(nginx\.conf:\d+\):14: bad request/
1047-
1048-
--- no_error_log
1049-
[alert]
1050-
1051-
1052-
1053-
=== TEST 19: bad request tries to receive
1054-
--- http_config eval
1055-
"lua_package_path '$::HtmlDir/?.lua;./?.lua;;';"
1056-
--- config
1057-
server_tokens off;
1058-
location = /main {
1059-
echo_location /t?reset=1;
1060-
echo_location /t;
1061-
}
1062-
location /t {
1063-
#set $port 5000;
1064-
set $port $TEST_NGINX_MEMCACHED_PORT;
1065-
10661009
content_by_lua '
10671010
local test = require "test"
10681011
if ngx.var.arg_reset then

0 commit comments

Comments
 (0)