Some more updates for regression testing.

This commit is contained in:
brectanus
2008-05-27 23:52:16 +00:00
parent 4bc1fc39f0
commit 7ad2766e76
7 changed files with 325 additions and 26 deletions

View File

@@ -1 +1,49 @@
### Misc directive tests
### TODO:
# SecTmpDir
# SecUploadDir
# SecUploadKeepFiles
# SecWebAppId
# SecDataDir
# SecChrootDir
# SecGuardianLog
# SecServerSignature
{
type => "config",
comment => "SecServerSignature On",
conf => qq(
SecServerSignature "NewServerSignature"
),
match_log => {
error => [ qr/NewServerSignature/, 1 ],
},
match_response => {
status => qr/^200$/,
raw => qr/^Server: +NewServerSignature$/m,
},
request => new HTTP::Request(
GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
),
},
# SecDefaultAction
{
type => "config",
comment => "SecServerSignature On",
conf => qq(
SecRuleEngine on
SecDefaultAction "phase:1,deny,status:500"
SecRule REQUEST_URI "test.txt"
),
match_log => {
error => [ qr/ModSecurity: Access denied with code 500 \(phase 1\)/, 1 ],
},
match_response => {
status => qr/^500$/,
},
request => new HTTP::Request(
GET => "http://$ENV{SERVER_NAME}:$ENV{SERVER_PORT}/test.txt",
),
},