lua-nginx-module/t
agentzh (Yichun Zhang) a9d1383bd9 minor test case style formatting. 2012-11-27 18:21:32 -08:00
..
023-rewrite minor test case style formatting. 2012-11-27 18:21:32 -08:00
024-access fixed various issues in the test suite. 2012-11-27 18:21:08 -08:00
lib cosocket: fixed ngx_log_debugN for non-debugging builds. also added a passing test case for running Daniele Alessandri's lua-redis library by emulating LuaSocket via ngx.socket :) 2011-12-22 22:14:24 +08:00
.gitignore added .gitignore file 2010-05-18 18:15:34 +08:00
000--init.t minor tweaks in tests. 2012-02-01 00:09:42 +08:00
000-sanity.t fixed issues for HEAD requests. 2011-09-01 14:50:40 +08:00
001-set.t fixed the test plan in 001-set.t. 2012-07-01 18:56:22 -07:00
002-content.t bugfix: ngx.say and ngx.print might cause nginx to crash when table-typed arguments were given. thanks sztanpet for reporting this in github issue #54. 2012-06-24 22:01:44 +08:00
003-errors.t inlined lua code now calculates the digest key only once at config time, this will save some CPU cycles per request. 2011-01-21 18:35:30 +08:00
004-require.t now we add "ngx" and "ndk" table into package.loaded such that the user can write "local ngx = require 'ngx'" and "local ndk = require 'ndk'". thanks @Lance. 2011-08-27 21:45:34 +08:00
005-exit.t ngx.exit(N) now no longer throws out a Lua exception when N >= 300 and a response header with a different status code has already been sent (but an error message will still be printed into the error.log file). this change makes Lua code debugging based on ngx.say/ngx.print much easier. thanks Matthieu Tourne for the suggestion. 2012-11-27 16:43:10 -08:00
006-escape.t added more tests for header_filter_by_lua (confirmed that various APIs are properly injected). 2011-09-01 19:47:48 +08:00
007-md5.t exposes the CRC32 API of the Nginx core to the Lua land, in the form of the ngx.crc32_short and ngx.crc32_long methods. thanks @Lance. 2011-09-23 15:40:50 +08:00
008-today.t renamed ngx.get_today() to ngx.today(), ngx.get_now() to ngx.now(), and ngx.get_now_ts() to ngx.time(). 2010-11-18 20:00:55 +08:00
009-log.t bugfix: ngx.log() would truncate the log messages with a null character (\0) in it. thanks Wang Xi for reporting this issue. 2012-11-20 11:16:28 -08:00
010-request_body.t fixed GitHub issue #38: request headers did not forward to subrequests when the "method" or "body" option is explicitly specified by a non-nil value for ngx.location.capture(). thanks Richard Kearsley. 2011-05-23 16:35:10 +08:00
011-md5_bin.t tweaked kindy's patch for base64/md5_bin/get_today etc a bit. and pfree aggressively to prevent leaking 2010-10-07 18:51:39 +08:00
012-now.t feature: added new API ngx.update_time which calls ngx_time_update in the Nginx core. 2011-11-24 21:32:35 +08:00
013-base64.t renamed ngx.base64_encode and ngx.base64_decode to ngx.encode_base64 and ngx.decode_base64 for consistency. 2010-11-14 16:00:58 +08:00
014-bugs.t refactor: now every lua coroutine takes its own context state for its nginx-side activities. bugfix: coroutine.status() returned "suspended" for "normal" coroutines. bugfix: coroutine.resume() did not return an error immediately when operating on "normal" coroutines. feature: added new dtrace static probes http-lua-user-coroutine-yield and http-lua-entry-coroutine-yield. 2012-08-28 16:04:08 -07:00
015-status.t minor test updates 2012-07-28 16:05:04 -07:00
016-resp-header.t use google.com instead of taobao.com in the test suite. 2012-09-10 00:59:14 -07:00
017-exec.t refactor: now every lua coroutine takes its own context state for its nginx-side activities. bugfix: coroutine.status() returned "suspended" for "normal" coroutines. bugfix: coroutine.resume() did not return an error immediately when operating on "normal" coroutines. feature: added new dtrace static probes http-lua-user-coroutine-yield and http-lua-entry-coroutine-yield. 2012-08-28 16:04:08 -07:00
018-ndk.t optimize: now we register the "ndk" and "ngx" lua tables for log_by_lua* at config time rather than request time. this gives significant performance boost. also improved error handling in log_by_lua*. 2012-06-11 14:42:11 +08:00
019-const.t added a test for ngx.HTTP_GATEWAY_TIMEOUT. 2011-12-02 17:22:06 +08:00
020-subrequest.t fixed a test case in 020-subrequest.t for slow machines. 2012-09-10 12:05:49 -07:00
021-cookie-time.t applied the patch from Feng Xinguo (@cyberty) to add ngx.http_time() function to expose the nginx core function ngx_http_time to the Lua land. 2011-06-30 18:51:52 +08:00
022-redirect.t use google.com instead of taobao.com in the test suite. 2012-09-10 00:59:14 -07:00
025-codecache.t reindexed the test numbers in t/025-codecache.t. 2012-06-07 22:50:20 +08:00
026-mysql.t minor test adjust. 2011-02-05 16:34:36 +08:00
027-multi-capture.t refactor: made ngx.location.capture() and ngx.location.capture_multi schedule themselves at the coroutine level (instead of the request level). 2012-09-10 19:04:45 -07:00
028-req-header.t bugfix: ngx.req.clear_header() would result in memory invalid reads when removing the 21st request headers. thanks Umesh Sirsiwal for reporting this issue in github issue #176. 2012-11-14 17:07:24 -08:00
029-http-time.t polished the implementation of ngx.cookie_time, ngx.http_time, and ngx.parse_http_time a bit: removed request object fetching code because we never use it and also added code to test NGX_ERROR returned by ngx_http_parse_time (we return nil in that case). 2011-07-21 17:43:54 +08:00
030-uri-args.t use google.com instead of taobao.com in the test suite. 2012-09-10 00:59:14 -07:00
031-post-args.t added debug log when ngx.req.get_uri_args and ngx.req.get_post_args hit max args limit. 2012-01-04 16:10:20 +08:00
032-iolist.t added tests for outputing lua tables. 2011-08-12 22:14:20 +08:00
033-ctx.t added error log tests to 033-ctx.t. 2012-05-02 19:43:05 +08:00
034-match.t feature: implemented ngx.thread.wait() for synchronously waiting on a child user thread, which also returns the final results of the last implicit call of coroutine.resume() on the user thread coroutine. so now an non-captured Lua exception in a user thread will not abort other running threads in the same nginx request. 2012-09-29 23:47:19 -07:00
035-gmatch.t bugfix: pattern matching an empty substring in ngx.re.gmatch did not match at the end of the subject string. 2012-09-28 00:07:47 -07:00
036-sub.t implemented the "o" regex option for ngx.re.sub(). 2011-08-27 19:04:16 +08:00
037-gsub.t bugfix: ngx.re.gsub() might throw out the "attempt to call a string value" exception when the "replace" argument is a Lua function and the subject string is large. thanks Zhu Maohai for reporting this issue. 2012-10-12 19:39:15 -07:00
038-match-o.t fixed the test cases regarding invalid escape sequences for LuaJIT 2.0.0 beta9. 2011-12-25 21:41:11 +08:00
039-sub-o.t now we add "ngx" and "ndk" table into package.loaded such that the user can write "local ngx = require 'ngx'" and "local ndk = require 'ndk'". thanks @Lance. 2011-08-27 21:45:34 +08:00
040-gsub-o.t checked in t/040-gsub-o.t. 2011-08-27 19:22:00 +08:00
041-header-filter.t fixed the test plan in t/041-header-filter.t. 2012-07-01 18:59:24 -07:00
042-crc32.t now for HTTP 1.0 requests, we disable the automatic full buffering mode if the user sets the Content-Length response header before sending out the headers. this allows streamming output for HTTP 1.0 requests if the content length can be calculated beforehand. thanks 李子义. 2011-09-29 00:36:45 -07:00
043-shdict.t feature: added the "get_keys" method for the shared dictionaries for fetching all the (or the specified number of) keys (default to 1024 keys). thanks Brian Akins for the patch in pull \#170. 2012-10-29 18:09:31 -07:00
044-req-body.t feature: implemented ngx.thread.wait() for synchronously waiting on a child user thread, which also returns the final results of the last implicit call of coroutine.resume() on the user thread coroutine. so now an non-captured Lua exception in a user thread will not abort other running threads in the same nginx request. 2012-09-29 23:47:19 -07:00
045-ngx-var.t bugfix: removing builtin headers in huge request headers with 20+ entries could result in data loss. thanks Chris Dumoulin for the patch. 2011-12-30 23:43:35 +08:00
046-hmac.t tweaked drdrxp's hmac-sha1 patch a bit and also added a test case for it. 2011-11-17 15:34:42 +08:00
047-match-jit.t now we check if pcre jit indeed works by scanning error.log in the related tests. 2011-11-20 16:21:59 +08:00
048-match-dfa.t ngx.re: now we disable jit automatically when in dfa mode. 2011-11-19 17:20:31 +08:00
049-gmatch-jit.t fixed a gcc compilation warning for pcre < 8.20. 2011-11-20 23:06:42 +08:00
050-gmatch-dfa.t ngx.re: now we disable jit automatically when in dfa mode. 2011-11-19 17:20:31 +08:00
051-sub-jit.t now we check if pcre jit indeed works by scanning error.log in the related tests. 2011-11-20 16:21:59 +08:00
052-sub-dfa.t now "j" and "d" regex options are confirmed to work with ngx.re.sub(). 2011-11-19 19:05:35 +08:00
053-gsub-jit.t now we check if pcre jit indeed works by scanning error.log in the related tests. 2011-11-20 16:21:59 +08:00
054-gsub-dfa.t tested the "d" and "j" regex options for DFA and JIT modes for ngx.re.gsub. 2011-11-20 15:52:06 +08:00
055-subreq-vars.t refactor: made ngx.location.capture() and ngx.location.capture_multi schedule themselves at the coroutine level (instead of the request level). 2012-09-10 19:04:45 -07:00
056-flush.t added a (passing) test case for using ngx.flush(true) in a user coroutine. 2012-09-12 15:21:27 -07:00
057-flush-timeout.t feature: implemented ngx.thread.wait() for synchronously waiting on a child user thread, which also returns the final results of the last implicit call of coroutine.resume() on the user thread coroutine. so now an non-captured Lua exception in a user thread will not abort other running threads in the same nginx request. 2012-09-29 23:47:19 -07:00
058-tcp-socket.t bugfix: ngx_lua cosocket's connect() method could not detect errors like "connection refused" when kqueue was used. tests: fixed the compatibilty issues in those test cases that were failing on non-Linux systems like FreeBSD. 2012-11-04 20:43:24 -08:00
059-unix-socket.t fixed test cases that rely on the old (broken) HTTP 1.0 support in ngx_echo. 2012-06-18 14:11:27 +08:00
060-lua-memcached.t bugfix: tcpsocket:setkeepalive() will return errors when the current connection has readable data or there is still unread data in the ngx_lua upstream buffer. bugfix: cosocket methods no longer explicitly return nil error strings upon success. 2012-02-19 13:46:19 +08:00
061-lua-redis.t refactor: now every lua coroutine takes its own context state for its nginx-side activities. bugfix: coroutine.status() returned "suspended" for "normal" coroutines. bugfix: coroutine.resume() did not return an error immediately when operating on "normal" coroutines. feature: added new dtrace static probes http-lua-user-coroutine-yield and http-lua-entry-coroutine-yield. 2012-08-28 16:04:08 -07:00
062-count.t feature: ngx.exit(N) can now abort pending subrequests when N = 408 (request time out) or N = 499 (client closed request) or N = -1 (error). feature: added ngx.on_abort() for registering user Lua function callback which will get called automatically when client abortion happens. 2012-11-07 20:07:00 -08:00
063-abort.t renamed .t files. 2012-01-19 12:36:56 +08:00
064-pcall.t renamed .t files. 2012-01-19 12:36:56 +08:00
065-tcp-socket-timeout.t feature: implemented ngx.thread.wait() for synchronously waiting on a child user thread, which also returns the final results of the last implicit call of coroutine.resume() on the user thread coroutine. so now an non-captured Lua exception in a user thread will not abort other running threads in the same nginx request. 2012-09-29 23:47:19 -07:00
066-socket-receiveuntil.t fixed test cases that rely on the old (broken) HTTP 1.0 support in ngx_echo. 2012-06-18 14:11:27 +08:00
067-req-socket.t bugfix: ngx.req.init_body/ngx.req.append_body/ngx.req.finish_body could not work with ngx.req.socket and resulted in infinite loops when the nginx request header reader has pre-read the beginning part of the request body. thanks Matthieu Tourne for reporting this issue. bugfix: the ngx.req.socket() object could not handle pipelined requests in some special cases. feature: added new dtrace static probe nginx_lua:::http-lua-req-socket-consume-preread. 2012-07-30 16:39:59 -07:00
068-socket-keepalive.t fixed a test case in 068-socket-keepalive.t by properly flushing the redis store first. 2012-09-13 15:21:49 -07:00
069-null.t various fixes in the test suite for the "use hup" testing mode. 2012-07-29 17:24:57 -07:00
070-sha1.t feature: added the ngx.sha1_bin method which returns the binary form of the SHA-1 digest. 2012-02-12 16:27:09 +08:00
071-idle-socket.t fixed a test case regarding cosocket set_keepalive on FreeBSD. 2012-11-05 16:36:10 -08:00
072-conditional-get.t bugfix: the lua light threads would leak in case of nginx filter finalization. this issue was caught by the "check leak" testing mode provided by Test::Nginx while running on Amazon EC2. 2012-10-09 22:41:59 -07:00
073-backtrace.t feature: implemented ngx.thread.wait() for synchronously waiting on a child user thread, which also returns the final results of the last implicit call of coroutine.resume() on the user thread coroutine. so now an non-captured Lua exception in a user thread will not abort other running threads in the same nginx request. 2012-09-29 23:47:19 -07:00
074-prefix-var.t feature: special nginx variable $prefix is now available in the lua_package_path and lua_package_cpath, which evaluates to the server prefix string (as specified by the -p PREFIX command-line option of the "nginx" executable). thanks Matthieu Tourne for the patch. 2012-05-22 15:03:37 +08:00
075-logby.t feature: now we print traceback to error.log when Lua errors happens in log_by_lua*. 2012-07-01 18:45:02 -07:00
076-no-postpone.t fixed coding style in Matthieu Tourne's patch for adding the rewrite_by_lua_no_postpone directive; also added some tests for it. 2012-05-25 08:39:04 +08:00
077-sleep.t refactor: removed unnecessary code from the sleep handler for ngx.sleep(). 2012-09-23 17:40:13 -07:00
078-hup-vars.t skipped the hup tests in "check leak" testing mode. 2012-07-29 21:12:43 -07:00
079-unused-directives.t added (passing) tests for the on-demand handler registration of body_filter_by_lua*. 2012-06-14 12:45:04 +08:00
080-hup-shdict.t skipped the hup tests in "check leak" testing mode. 2012-07-29 21:12:43 -07:00
081-bytecode.t merged jinglong's "bytecode" branch into "master". 2012-06-14 19:53:17 +08:00
082-body-filter.t enlarged the timeout setting for TEST 16 in 082-body-filter.t to make it less possible to fail in slow testing modes. 2012-07-02 15:12:59 -07:00
083-bad-sock-self.t fixed a bad test case in 083-bad-sock-self.t. 2012-06-15 14:26:11 +08:00
084-inclusive-receiveuntil.t added more (passing) tests for the "inclusive" option of cosocket:receiveuntil(). 2012-06-15 14:44:35 +08:00
085-if.t fixed a test case in 085-if.t that hard-coded TEST_NGINX_CLIENT_PORT in nginx config. 2012-07-03 12:08:20 -07:00
086-init-by.t bugfix: init_by_lua* might be skipped altogether when HUP config reload was used. 2012-07-03 11:50:51 -07:00
087-udp-socket.t bugfix: ngx_lua cosocket's connect() method could not detect errors like "connection refused" when kqueue was used. tests: fixed the compatibilty issues in those test cases that were failing on non-Linux systems like FreeBSD. 2012-11-04 20:43:24 -08:00
088-req-method.t feature: added new Nginx API for Lua: ngx.req.set_method(method_id) and ngx.req.get_method. thanks Matthieu Tourne for suggesting these. 2012-07-05 14:33:52 -07:00
089-phase.t fixed the test plan in 089-phase.t so that it works with different repeat_each settings. 2012-07-27 15:11:14 -07:00
090-log-socket-errors.t checked in files that are missing in the previous commit for lua_socket_log_errors. 2012-08-11 12:05:48 -07:00
091-coroutine.t resolved conflicts while merging "master" into "thread". 2012-09-23 12:24:02 -07:00
092-eof.t added (passing) tests for using parallel subrequests after ngx.eof(). 2012-09-12 20:45:53 -07:00
093-uthread-spawn.t fixed those test cases using the UDP cosockets to be prepared for data read in a single run (without EAGAIN, that is). 2012-10-09 22:55:26 -07:00
094-uthread-exit.t feature: implemented ngx.thread.wait() for synchronously waiting on a child user thread, which also returns the final results of the last implicit call of coroutine.resume() on the user thread coroutine. so now an non-captured Lua exception in a user thread will not abort other running threads in the same nginx request. 2012-09-29 23:47:19 -07:00
095-uthread-exec.t feature: implemented ngx.thread.wait() for synchronously waiting on a child user thread, which also returns the final results of the last implicit call of coroutine.resume() on the user thread coroutine. so now an non-captured Lua exception in a user thread will not abort other running threads in the same nginx request. 2012-09-29 23:47:19 -07:00
096-uthread-redirect.t feature: implemented ngx.thread.wait() for synchronously waiting on a child user thread, which also returns the final results of the last implicit call of coroutine.resume() on the user thread coroutine. so now an non-captured Lua exception in a user thread will not abort other running threads in the same nginx request. 2012-09-29 23:47:19 -07:00
097-uthread-rewrite.t feature: implemented ngx.thread.wait() for synchronously waiting on a child user thread, which also returns the final results of the last implicit call of coroutine.resume() on the user thread coroutine. so now an non-captured Lua exception in a user thread will not abort other running threads in the same nginx request. 2012-09-29 23:47:19 -07:00
098-uthread-wait.t polished the test for ngx.thread.wait a bit. 2012-09-30 18:52:58 -07:00
099-c-api.t bugfix: ffi.copy() was used incorrectly in the test cases in 099-c-api.t: it might write out of the buffer. this issue was caught by valgrind on linux i386. 2012-10-05 12:15:01 -07:00
100-client-abort.t fixed various issues in the test suite. 2012-11-27 18:21:08 -08:00
101-on-abort.t fixed various issues in the test suite. 2012-11-27 18:21:08 -08:00
StapThread.pm feature: ngx.exit(N) can now abort pending subrequests when N = 408 (request time out) or N = 499 (client closed request) or N = -1 (error). feature: added ngx.on_abort() for registering user Lua function callback which will get called automatically when client abortion happens. 2012-11-07 20:07:00 -08:00