Skip to content

Commit

Permalink
Add framework for running tests in a docker container:
Browse files Browse the repository at this point in the history
	* Dockerfile-test
	* docker-compose.yml
	* Makefile updates
  • Loading branch information
bean5 committed Oct 5, 2016
1 parent 57a3d35 commit c66fcec
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM ubuntu:latest

RUN apt-get update && apt-get upgrade -y
RUN apt-get -y install python-setuptools python2.7 git tox

RUN easy_install pip

WORKDIR /home/elastalert

ADD requirements*.txt ./
RUN pip install -r requirements-dev.txt
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ install-hooks:
test:
tox

test-docker:
docker-compose --project-name elastalert build tox
docker-compose --project-name elastalert run tox

clean:
make -C docs clean
find . -name '*.pyc' -delete
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '2'
services:
tox:
build:
context: ./
dockerfile: Dockerfile-test
command: tox
container_name: elastalert_tox
working_dir: /home/elastalert
volumes:
- ./:/home/elastalert/

0 comments on commit c66fcec

Please sign in to comment.