From 8c6c876d013a513ee5930de3ba0d06ab5f4290cd Mon Sep 17 00:00:00 2001 From: dieterve Date: Fri, 20 Jan 2017 14:35:15 +0100 Subject: [PATCH] Manually run the tests --- circle.yml | 4 ++++ install-elasticsearch.sh | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/circle.yml b/circle.yml index 23ac7f1..a9c1042 100644 --- a/circle.yml +++ b/circle.yml @@ -7,3 +7,7 @@ machine: dependencies: pre: - sh ./install-elasticsearch.sh testing + +test: + override: + - phpunit tests diff --git a/install-elasticsearch.sh b/install-elasticsearch.sh index 5685662..30987d2 100644 --- a/install-elasticsearch.sh +++ b/install-elasticsearch.sh @@ -19,16 +19,15 @@ rm elasticsearch-$ELASTICSEARCH_VERSION.deb # Configure Elasticsearch for development purposes (1 shard/no replicas, don't allow it to swap at all if it can run without swapping) sudo sed -i "s/#index.number_of_shards: 1/index.number_of_shards: 1/" /etc/elasticsearch/elasticsearch.yml sudo sed -i "s/#index.number_of_replicas: 0/index.number_of_replicas: 0/" /etc/elasticsearch/elasticsearch.yml -sudo sed -i "s/#bootstrap.mlockall: true/bootstrap.mlockall: true/" /etc/elasticsearch/elasticsearch.yml +sudo sed -i "s/#bootstrap.memory_lock: true/bootstrap.memory_lock: true/" /etc/elasticsearch/elasticsearch.yml if [ "$1" != "testing" ] ; then echo ">>> Binding elasticsearch to all network hosts" sudo sed -i "s/#network.host: 192.168.0.1/network.host: 0.0.0.0/" /etc/elasticsearch/elasticsearch.yml fi -sudo service elasticsearch restart - # Configure to start up Elasticsearch automatically sudo update-rc.d elasticsearch defaults 95 10 +sudo -i service elasticsearch restart until $(curl --output /dev/null --silent --head --fail http://localhost:9200); do printf ">>> Waiting for elasticsearch to start on localhost:9200\n"