Skip to content

Commit

Permalink
test: create 9520102 regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
EsadCetiner authored Dec 28, 2023
1 parent 27b231e commit 33d1371
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 1 deletion.
1 change: 0 additions & 1 deletion tests/regression/sogo-rule-exclusions-plugin/9520101.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ tests:
Host: localhost
User-Agent: SOGo rule exclusions plugin
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
cookie: \%
port: 80
method: POST
uri: /SOGo/connect?json.password=<script>
Expand Down
97 changes: 97 additions & 0 deletions tests/regression/sogo-rule-exclusions-plugin/9520102.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
meta:
author: "Esad Cetiner"
description: "SOGo Rule Exclusions Plugin"
enabled: true
name: 9520102.yaml
tests:
- test_title: 9520102-1
desc: Disable 920440 if uri ends in com
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: SOGo rule exclusions plugin
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
port: 80
method: POST
uri: /SOGo/example.com
output:
no_log_contains: id "920440"
- test_title: 9520102-2
desc: Disable 920440 if uri ends in com
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: SOGo rule exclusions plugin
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
port: 80
method: POST
uri: /SOGo/so/example.com
output:
no_log_contains: id "920440"
- test_title: 9520102-3
desc: Disable 920440 if uri ends in com
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: SOGo rule exclusions plugin
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
port: 80
method: POST
uri: /SOGo/dav/example.com
output:
no_log_contains: id "920440"
- test_title: 9520102-4
desc: Disable 920440 if uri ends in inc
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: SOGo rule exclusions plugin
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
port: 80
method: POST
uri: /SOGo/example.inc
output:
no_log_contains: id "920440"
- test_title: 9520102-5
desc: Disable 920440 if uri ends in inc
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: SOGo rule exclusions plugin
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
port: 80
method: POST
uri: /SOGo/so/example.inc
output:
no_log_contains: id "920440"
- test_title: 9520102-6
desc: Disable 920440 if uri ends in inc
stages:
- stage:
input:
dest_addr: 127.0.0.1
headers:
Host: localhost
User-Agent: SOGo rule exclusions plugin
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
port: 80
method: POST
uri: /SOGo/dav/example.inc
output:
no_log_contains: id "920440"

0 comments on commit 33d1371

Please sign in to comment.