ronzalo / spree_searchkick

Add Elasticsearch goodies to Spree, powered by searchkick
BSD 3-Clause "New" or "Revised" License
31 stars 57 forks source link

Run test elasticseach cluster in specs #20

Closed artplan1 closed 6 years ago

artplan1 commented 6 years ago

I tried to run tests locally, but didn't have elasticsearch started as service

This fix adds running elasticsearch on tests run

It uses elasticsearch installed in system, but starts new test cluster

more info here: https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-extensions#testcluster

Also fixes this flaky error on CI:

 Elasticsearch::Transport::Transport::Errors::NotFound:
       [404] {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such