Permalink
Browse files

added a local elasticsearch for the tests

  • Loading branch information...
1 parent 6afba1e commit 1f6a72f7b1461666e592612ca2e4a478b41171b5 @tarekziade tarekziade committed Feb 12, 2013
Showing with 27 additions and 2 deletions.
  1. +17 −2 Makefile
  2. +10 −0 elasticsearch.yml
View
@@ -4,20 +4,35 @@ PYTHON = $(BIN)/python
INSTALL = $(BIN)/pip install
VTENV_OPTS ?= --distribute
+ES_VERSION ?= 0.20.4
-.PHONY: all build test
+BUILD_DIRS = bin build elasticsearch include lib lib64 man share
+
+
+.PHONY: all test testjs
all: build
$(PYTHON):
virtualenv $(VTENV_OPTS) .
-build: $(PYTHON)
+build: $(PYTHON) elasticsearch
$(PYTHON) setup.py develop
$(INSTALL) monolith[test]
+clean:
+ rm -rf $(BUILD_DIRS)
+
+
test: build
$(BIN)/nosetests -s -d -v --with-coverage --cover-package monolith monolith
testjs: build
testacular start --single-run
+
+elasticsearch:
+ curl -C - --progress-bar http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$(ES_VERSION).tar.gz | tar -zx
+ mv elasticsearch-$(ES_VERSION) elasticsearch
+ chmod a+x elasticsearch/bin/elasticsearch
+ mv elasticsearch/config/elasticsearch.yml elasticsearch/config/elasticsearch.in.yml
+ cp elasticsearch.yml elasticsearch/config/elasticsearch.yml
View
@@ -0,0 +1,10 @@
+cluster.name: monolith
+node.name: "mono_1"
+
+index.number_of_shards: 1
+index.number_of_replicas: 0
+
+transport.tcp.port: 9310
+http.port: 9210
+
+discovery.zen.ping.multicast.enabled: false

0 comments on commit 1f6a72f

Please sign in to comment.