Skip to content

Commit 42be273

Browse files
committed
travis-ci: improve building script and fix audit log test config
1 parent 8d5811a commit 42be273

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

.travis.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
sudo: required
12
dist: trusty
2-
sudo: true
3+
4+
os: linux
5+
6+
language: c
7+
8+
compiler:
9+
- gcc
310

411
addons:
512
apt:
@@ -13,8 +20,7 @@ env:
1320
- VER_NGINX=1.10.3
1421

1522
before_script:
16-
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
17-
- sudo apt-get update -qq
23+
- cd ..
1824
- git clone https://github.com/SpiderLabs/ModSecurity.git
1925
- cd ModSecurity
2026
- git checkout v3/master
@@ -24,15 +30,13 @@ before_script:
2430
- ./configure --without-lmdb
2531
- make
2632
- sudo make install
27-
- cd -
28-
- git clone https://github.com/SpiderLabs/ModSecurity-nginx.git
29-
- wget "http://nginx.org/download/nginx-${VER_NGINX}.tar.gz" && tar -xf "nginx-${VER_NGINX}.tar.gz"
30-
- cd "./nginx-${VER_NGINX}"
33+
- cd ..
34+
- wget http://nginx.org/download/nginx-${VER_NGINX}.tar.gz && tar -xf nginx-${VER_NGINX}.tar.gz
35+
- cd nginx-${VER_NGINX}
3136
- ./configure --add-module=../ModSecurity-nginx
3237
- make
3338
- sudo make install
34-
- cd -
35-
- export PATH=$PATH:/usr/local/nginx/sbin
39+
- cd ..
3640
- wget http://hg.nginx.org/nginx-tests/archive/tip.tar.gz
3741
- tar xvzf tip.tar.gz
3842
- cd nginx-tests-*

tests/modsecurity-config-auditlog.t

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ http {
5656
modsecurity on;
5757
modsecurity_rules '
5858
SecRuleEngine On
59-
SecAuditLogEngine On
59+
SecAuditEngine On
6060
SecRule ARGS "@streq whee" "id:10,phase:2"
6161
SecRule ARGS "@streq whee" "id:11,phase:2"
6262
';
@@ -66,7 +66,7 @@ http {
6666
SecRule ARGS "@streq root" "id:21,phase:1,auditlog,status:302,redirect:http://www.modsecurity.org"
6767
SecDebugLog %%TESTDIR%%/auditlog-debug-root.txt
6868
SecDebugLogLevel 9
69-
SecAuditLogEngine On
69+
SecAuditEngine On
7070
SecAuditLogParts AB
7171
SecAuditLog %%TESTDIR%%/auditlog-root.txt
7272
SecAuditLogType Serial
@@ -80,7 +80,7 @@ http {
8080
SecDebugLog %%TESTDIR%%/auditlog-debug-subfolder1.txt
8181
SecDebugLogLevel 9
8282
SecAuditLogParts AB
83-
SecAuditLogEngine On
83+
SecAuditEngine On
8484
SecAuditLog %%TESTDIR%%/auditlog-subfolder1.txt
8585
SecAuditLogType Serial
8686
SecAuditLogStorageDir %%TESTDIR%%/
@@ -90,7 +90,7 @@ http {
9090
SecRule ARGS "@streq subfolder2" "id:41,phase:1,status:302,auditlog,redirect:http://www.modsecurity.org"
9191
SecDebugLog %%TESTDIR%%/auditlog-debug-subfolder2.txt
9292
SecDebugLogLevel 9
93-
SecAuditLogEngine On
93+
SecAuditEngine On
9494
SecAuditLogParts AB
9595
SecAuditLog %%TESTDIR%%/auditlog-subfolder2.txt
9696
SecAuditLogType Serial
@@ -104,7 +104,7 @@ http {
104104
SecDebugLog %%TESTDIR%%/auditlog-debug-subfolder3.txt
105105
SecDebugLogLevel 9
106106
SecAuditLogParts AB
107-
SecAuditLogEngine On
107+
SecAuditEngine On
108108
SecAuditLog %%TESTDIR%%/auditlog-subfolder3.txt
109109
SecAuditLogType Serial
110110
SecAuditLogStorageDir %%TESTDIR%%/
@@ -115,7 +115,7 @@ http {
115115
SecRule ARGS "@streq subfolder4withE" "id:2,phase:1,status:302,ctl:auditLogParts=+E,auditlog,redirect:http://www.modsecurity.org"
116116
SecDebugLog %%TESTDIR%%/auditlog-debug-subfolder4.txt
117117
SecDebugLogLevel 9
118-
SecAuditLogEngine On
118+
SecAuditEngine On
119119
SecAuditLogParts AB
120120
SecAuditLog %%TESTDIR%%/auditlog-subfolder4.txt
121121
SecAuditLogType Serial

0 commit comments

Comments
 (0)