-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
24 lines (19 loc) · 1.44 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
language: python
services:
- docker
before_script:
- echo '1.1.1.1 - - [01/Jan/2017:01:00:00 +0000] "GET /awstats/awstats.pl HTTP/1.1" 200 1135 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0"' > access.log
- echo '172.17.0.1 - - [01/Jan/2017:02:00:00 +0000] "GET /awstats/awstats.pl HTTP/1.1" 200 1135 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0"' >> access.log
- echo '1.2.3.4 - - [01/Jan/2017:03:00:00 +0000] "GET /awstats/awstats.pl HTTP/1.1" 200 1135 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0"' >> access.log
script:
- docker build -t test-awstats .
- docker run --rm -v test-awstats-db:/var/lib/awstats -v $PWD/:/web-logs:ro -e SKIP_HOSTS_ADDITIONAL="^1.1\." test-awstats /web-logs/access\*.log > awstats-1.log
- grep 'Found 2 dropped records' awstats-1.log
- grep 'Found 0 old records' awstats-1.log
- grep 'Found 1 new qualified records' awstats-1.log
- docker run --rm -v test-awstats-db:/var/lib/awstats -v $PWD/:/web-logs:ro -e SKIP_HOSTS_ADDITIONAL="^1.1\." test-awstats /web-logs/access\*.log > awstats-2.log
- grep 'Found 0 dropped records' awstats-2.log
- grep 'Found 3 old records' awstats-2.log
- grep 'Found 0 new qualified records' awstats-2.log
# docker run -v test-awstats-db:/var/lib/awstats -p 8080:8080 test-awstats
# curl --fail -L localhost:8080 | grep 'Statistics for localhost'