-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix scan swallow NotFoundError #43
Conversation
will find linux somewhere and fix docker later |
docker.api.inspect_container(container.id)['NetworkSettings']['IPAddress'] is so tricky, if ports map not to what about just set host to |
Codecov Report
@@ Coverage Diff @@
## master #43 +/- ##
==========================================
- Coverage 98.85% 98.39% -0.47%
==========================================
Files 7 7
Lines 436 435 -1
Branches 76 76
==========================================
- Hits 431 428 -3
- Misses 2 4 +2
Partials 3 3
Continue to review full report at Codecov.
|
I used binding to random local ports and found the solution is not reliable. |
tests/conftest.py
Outdated
"5.5.1 by default")) | ||
parser.addoption("--no-pull", action="store_true", default=False, | ||
help="Don't perform docker images pulling") | ||
parser.addoption('--es_tag', action='append', default=[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you hate double quotes?
tests/conftest.py
Outdated
def es_container(docker, session_id, es_tag, request): | ||
image = 'docker.elastic.co/elasticsearch/elasticsearch:{}'.format(es_tag) | ||
def es_container(docker, session_id, es_tag, unused_port, request): | ||
image = 'docker.elastic.co/elasticsearch/elasticsearch:{es_tag}'.format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting for formatting, isn't it?
Regarding docker for mac https://docs.docker.com/docker-for-mac/networking/
Unfortunately, due to limitations in macOS, we’re unable to route traffic to containers, and from containers back to the host.`
Because of the way networking is implemented in Docker for Mac, you cannot see a docker0 interface in macOS. This interface is actually within HyperKit.
The docker (Linux) bridge network is not reachable from the macOS host. As I understand there is no way to bridge configuration... |
Another problem that it is impossible to combine pytest fixture + scopes due pytest-dev/pytest#519 , right now tests make each time new elasticsearch container |
Formatting comments were fixed |
Previously tests for As well if tests were failing hard, container hasn't been removed So, container will be removed only on added option |
scan.scroll_id
returnsself._scroll_id
, fixed related testsNotFoundError
during scrolling, comes when search context do not exists anymore or scroll was explicitly cleared, added corresponding testsurrogatepass
, it was back-ported from upstream, which has reverted it in mastertest_elastic_default_loop
must do not run inside coroutine, otherwise it will find loop anywayparametrize