From 69bf6b3c7ef6596d9d32a7c453d5305c4dcc1af2 Mon Sep 17 00:00:00 2001
From: aviau <alexandre@alexandreviau.net>
Date: Thu, 6 Aug 2015 17:04:50 -0400
Subject: [PATCH] Updated makefile to add mongodb

Change-Id: Ia2f3c42344d48485c0d122d4bc9333e5bc6c7096
---
 Makefile | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 381af5e..97a4982 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,10 @@
-test: clean
+test: clean start-mongo
 	tox
+	sudo docker stop surveil_test_mongo
+
+integration: clean
+	tox -eintegration
+	sudo docker stop surveil_test_mongo
 
 clean:
 	rm -rf pbr-*.egg
@@ -7,3 +12,9 @@ clean:
 	rm -rf .tox
 	rm -rf .testrepository
 	rm -rf doc/build
+	- sudo docker kill surveil_test_mongo
+	- sudo docker rm surveil_test_mongo
+
+start-mongo:
+	sudo docker pull mongo
+	sudo docker run -d --name surveil_test_mongo -p 27017:27017 mongo mongod --smallfiles --noprealloc