Skip to content

Commit

Permalink
Manually run the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dieterve committed Jan 20, 2017
1 parent d966abc commit 8c6c876
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ machine:
dependencies:
pre:
- sh ./install-elasticsearch.sh testing

test:
override:
- phpunit tests
5 changes: 2 additions & 3 deletions install-elasticsearch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 8c6c876

Please sign in to comment.