django-elasticsearch-dsl icon indicating copy to clipboard operation
django-elasticsearch-dsl copied to clipboard

Consider optionally using mocked Elasticsearch in tests

Open barseghyanartur opened this issue 7 years ago • 3 comments

It would be nice to have an option to use mocked Elasticsearch if explicitly specified in settings (settings.ELASTICSEARCH_DSL_TEST == True).

So, if devs would like to skip elasticsearch tests, they would just patch the settings.

barseghyanartur avatar May 23 '17 10:05 barseghyanartur

I was going to ask this same question. I think I'd need a way to mock elasticsearch for tests.

gregpinero avatar Jul 18 '17 21:07 gregpinero

@gregpinero:

That would be nice of course.

If you want to work on the issue, you can help this guy here.

I myself found it finally less work to use a real Elastic in tests (using Docker or Vagrant). For indexes, I use the following trick.

barseghyanartur avatar Jul 18 '17 21:07 barseghyanartur

Did someone found solution for that topic? Seems like https://github.com/vrcmarcos/elasticmock/issues/4 won't be fixed.

mglowinski93 avatar Aug 25 '22 14:08 mglowinski93