forked from alibaba/tengine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http://rb.corp.taobao.com/r/29993/ git-svn-id: http://code.taobao.org/svn/tengine/trunk@63 8a6cbc4f-5610-49f6-9325-3f9afe71ff98
- Loading branch information
weiyue
committed
May 7, 2012
1 parent
fd4b617
commit 3f0ebba
Showing
1 changed file
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
use lib 'lib'; | ||
use Test::Nginx::Socket; | ||
plan tests => blocks() + 0; | ||
run_tests(); | ||
|
||
__DATA__ | ||
=== TEST 1: syslog:user for access log === | ||
--- config | ||
location /p { | ||
access_log syslog:user; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 2: syslog:user:info for access log === | ||
--- config | ||
location /p { | ||
access_log syslog:user:info; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 3: syslog:user:info:127.0.0.1 for access log === | ||
--- config | ||
location /p { | ||
access_log syslog:user:info:127.0.0.1; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 4: syslog:user:info:127.0.0.1:514 for access log === | ||
--- config | ||
location /p { | ||
access_log syslog:user:info:127.0.0.1:514; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 5: syslog:user:info:127.0.0.1:514:test.taobao.com for access log === | ||
--- config | ||
location /p { | ||
access_log syslog:user:info:127.0.0.1:514:test.taobao.com; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 6: syslog:user::127.0.0.1:514:test.taobao.com for access log === | ||
--- config | ||
location /p { | ||
access_log syslog:user::127.0.0.1:514:test.taobao.com; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 7: syslog:user:info:127.0.0.1::test.taobao.com for access log === | ||
--- config | ||
location /p { | ||
access_log syslog:user:info:127.0.0.1::test.taobao.com; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 8: syslog:user:info:/dev/log:test.taobao.com for access log === | ||
--- config | ||
location /p { | ||
access_log syslog:user::/dev/log:test.taobao.com; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 9: syslog:user:info:/dev/log for access log === | ||
--- config | ||
location /p { | ||
access_log syslog:user::/dev/log; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 11: syslog:user for error log === | ||
--- config | ||
location /p { | ||
error_log syslog:user; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 12: syslog:user:info for error log === | ||
--- config | ||
location /p { | ||
error_log syslog:user:info; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 13: syslog:user:info:127.0.0.1 for error log === | ||
--- config | ||
location /p { | ||
error_log syslog:user:info:127.0.0.1; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 14: syslog:user:info:127.0.0.1:514 for error log === | ||
--- config | ||
location /p { | ||
error_log syslog:user:info:127.0.0.1:514; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 15: syslog:user:info:127.0.0.1:514:test.taobao.com for error log === | ||
--- config | ||
location /p { | ||
error_log syslog:user:info:127.0.0.1:514:test.taobao.com; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 16: syslog:user::127.0.0.1:514:test.taobao.com for error log === | ||
--- config | ||
location /p { | ||
error_log syslog:user::127.0.0.1:514:test.taobao.com; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 17: syslog:user:info:127.0.0.1::test.taobao.com for error log === | ||
--- config | ||
location /p { | ||
error_log syslog:user:info:127.0.0.1::test.taobao.com; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 18: syslog:user:info:/dev/log:test.taobao.com for error log === | ||
--- config | ||
location /p { | ||
error_log syslog:user::/dev/log:test.taobao.com; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||
=== TEST 19: syslog:user:info:/dev/log for error log === | ||
--- config | ||
location /p { | ||
error_log syslog:user::/dev/log; | ||
empty_gif; | ||
} | ||
--- request | ||
GET /p | ||
--- error_code: 200 | ||