Skip to content

Commit

Permalink
Add unit tests and travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fholzer committed Oct 5, 2016
1 parent 17fc0fd commit c349eaa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: generic

services:
- docker

install:
- docker build -t nginx-brotli .

script:
- sh runTests.sh

1 change: 1 addition & 0 deletions runTests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run --rm -v $(pwd)/tests.sh:/tests.sh --entrypoint sh nginx-brotli /tests.sh
10 changes: 10 additions & 0 deletions tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if [ "x`whoami`" == "xroot" ]; then
echo "Installing test dependencies..."
apk update
apk add mercurial openssl ffmpeg uwsgi uwsgi-python perl perl-fcgi perl-gd perl-io-socket-ssl perl-net-ssleay
su -s /bin/sh -c /runTests.sh - nginx
else
hg clone http://mdounin.ru/hg/nginx-tests
cd nginx-tests
TEST_NGINX_BINARY=/usr/sbin/nginx-debug TEST_NGINX_MODULES=/etc/nginx/modules TEST_NGINX_LEAVE=1 prove .
fi

0 comments on commit c349eaa

Please sign in to comment.