Comments (13)
I could reproduce your error yesterday. I will work on it today :)
from elasticmock.
I've created a branch to us to work on that: https://github.com/vrcmarcos/elasticmock/tree/barseghyanartur
I had found the error and now we need to mock the bulk method. Could you help me in this, @barseghyanartur ? :)
Note that I've left some ipdb.set_trace()
in the code in order to you check the critical points
from elasticmock.
I'm closing this, because at the end testing without Elastic does not make sense. And testing with Elastic is so simple, that there's practically no need for mocking (unless you have a very complicated case, which I at the moment of writing can't think of).
from elasticmock.
Hi @barseghyanartur ! Thanks for posting this issue!
Could you post the elasticsearch
, elasticsearch-dsl
and django-elasticsearch-dsl
libs version?
from elasticmock.
I tried it with:
elasticsearch==2.4.1
elasticsearch-dsl==2.2.0
https://github.com/sabricot/django-elasticsearch-dsl/archive/master.zip
django-elasticsearch-dsl installed from master.
I tried the same with latest versions as well.
elasticsearch==5.3.0
elasticsearch-dsl==5.3.0
from elasticmock.
Did you have time for digging into it?
from elasticmock.
Sorry @barseghyanartur , I didn't debugged this yet :(
But the lib was designed to run with elastic 1.x and Python 2.7. But with some minor changes it can be fully functional to other versions
from elasticmock.
The root cause of this error is this: elasticsearch/connection/http_urllib3.py:89: ConnectionError
. We need to properly patch this function and prevent the original from being called
from elasticmock.
I'm sorry, I don't seem to get free time for this: not at work and not in my free time.
from elasticmock.
@vrcmarcos, @barseghyanartur: Do you two have time to work on this soon? elasticmock
seems to be broken with the elasticsearch==5.4.0
library.
from elasticmock.
I don't think I need it that much. I use elasticsearch-dsl-py
and connections are executed in runtime (function/method level) only. I have Elasticsearch 5 installed locally annd 2.x running using Vagrant/VirtualBox.
from elasticmock.
Could you also elaborate on what the exact issue is? I'm trying to fix it now.
I'm looking at your branch, and you mentioned that the bulk
method needs to be mocked. Is that all that needs to be done?
from elasticmock.
Sorry @nhooey , I can not have time to maintain this library. I'm accepting PR and giving merge power to some guys who are sending PRs.
from elasticmock.
Related Issues (20)
- Elasticsearch expects 'skipped' key in shards HOT 4
- elasticsearch.helpers.bulk doesn't work
- NotImplementedError: Fake query evaluation not implemented for query type: MATCH_ALL
- FakeSearch ignores attribute _source HOT 2
- Elasticsearch QueryType "should" missing HOT 1
- No `cat` client HOT 1
- elasticmock doesn't support some elasticsearch_dsl features HOT 1
- Some query parameters don't work HOT 1
- Deprecated use of _type in bulk API HOT 2
- If change import style elasticsearch mock fuctionality not working properly HOT 5
- Bulk API not working HOT 2
- prefix query type is not supporting
- Support elasticsearch >=8.0.0 HOT 2
- Question- Any plans to support Opensearch? HOT 1
- Add support for Elasticsearch.create
- Elasticmock does not mock the Elasticsearch client HOT 1
- FakeQueryCondition._evaluate_for_range_query_type tries to isoparse a datetime object HOT 2
- Add support for Elasticsearch.update
- Give more meaningful error messages when functions are not supported
- Interaction with test suites that reset the random package's seed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticmock.