mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-08-03 04:10:48 +08:00
elasticsearch: stop testing on ancient versions (#2422)
Pick 6.0 as the baseline.
This commit is contained in:

committed by
GitHub

parent
9ce1c26d27
commit
4de0e5659d
@ -32,7 +32,7 @@ dependencies = [
|
||||
|
||||
[project.optional-dependencies]
|
||||
instruments = [
|
||||
"elasticsearch >= 2.0",
|
||||
"elasticsearch >= 6.0",
|
||||
]
|
||||
|
||||
[project.entry-points.opentelemetry_instrumentor]
|
||||
|
@ -1,22 +0,0 @@
|
||||
asgiref==3.7.2
|
||||
attrs==23.2.0
|
||||
Deprecated==1.2.14
|
||||
elasticsearch==2.4.1
|
||||
elasticsearch-dsl==2.2.0
|
||||
importlib-metadata==6.11.0
|
||||
iniconfig==2.0.0
|
||||
packaging==23.2
|
||||
pluggy==1.4.0
|
||||
py==1.11.0
|
||||
py-cpuinfo==9.0.0
|
||||
pytest==7.1.3
|
||||
pytest-benchmark==4.0.0
|
||||
python-dateutil==2.8.2
|
||||
six==1.16.0
|
||||
tomli==2.0.1
|
||||
typing_extensions==4.10.0
|
||||
urllib3==1.26.18
|
||||
wrapt==1.16.0
|
||||
zipp==3.17.0
|
||||
-e opentelemetry-instrumentation
|
||||
-e instrumentation/opentelemetry-instrumentation-elasticsearch
|
@ -1,22 +0,0 @@
|
||||
asgiref==3.7.2
|
||||
attrs==23.2.0
|
||||
Deprecated==1.2.14
|
||||
elasticsearch==5.5.3
|
||||
elasticsearch-dsl==5.4.0
|
||||
importlib-metadata==6.11.0
|
||||
iniconfig==2.0.0
|
||||
packaging==23.2
|
||||
pluggy==1.4.0
|
||||
py==1.11.0
|
||||
py-cpuinfo==9.0.0
|
||||
pytest==7.1.3
|
||||
pytest-benchmark==4.0.0
|
||||
python-dateutil==2.8.2
|
||||
six==1.16.0
|
||||
tomli==2.0.1
|
||||
typing_extensions==4.10.0
|
||||
urllib3==2.2.1
|
||||
wrapt==1.16.0
|
||||
zipp==3.17.0
|
||||
-e opentelemetry-instrumentation
|
||||
-e instrumentation/opentelemetry-instrumentation-elasticsearch
|
@ -1,33 +0,0 @@
|
||||
from elasticsearch_dsl import ( # pylint: disable=no-name-in-module
|
||||
DocType,
|
||||
String,
|
||||
)
|
||||
|
||||
|
||||
class Article(DocType):
|
||||
title = String(analyzer="snowball", fields={"raw": String()})
|
||||
body = String(analyzer="snowball")
|
||||
|
||||
class Meta:
|
||||
index = "test-index"
|
||||
|
||||
|
||||
dsl_create_statement = {
|
||||
"mappings": {
|
||||
"article": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"analyzer": "snowball",
|
||||
"fields": {"raw": {"type": "string"}},
|
||||
"type": "string",
|
||||
},
|
||||
"body": {"analyzer": "snowball", "type": "string"},
|
||||
}
|
||||
}
|
||||
},
|
||||
"settings": {"analysis": {}},
|
||||
}
|
||||
dsl_index_result = (1, {}, '{"created": true}')
|
||||
dsl_index_span_name = "Elasticsearch/test-index/article/2"
|
||||
dsl_index_url = "/test-index/article/2"
|
||||
dsl_search_method = "GET"
|
@ -1,33 +0,0 @@
|
||||
from elasticsearch_dsl import ( # pylint: disable=no-name-in-module
|
||||
DocType,
|
||||
Keyword,
|
||||
Text,
|
||||
)
|
||||
|
||||
|
||||
class Article(DocType):
|
||||
title = Text(analyzer="snowball", fields={"raw": Keyword()})
|
||||
body = Text(analyzer="snowball")
|
||||
|
||||
class Meta:
|
||||
index = "test-index"
|
||||
|
||||
|
||||
dsl_create_statement = {
|
||||
"mappings": {
|
||||
"article": {
|
||||
"properties": {
|
||||
"title": {
|
||||
"analyzer": "snowball",
|
||||
"fields": {"raw": {"type": "keyword"}},
|
||||
"type": "text",
|
||||
},
|
||||
"body": {"analyzer": "snowball", "type": "text"},
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
dsl_index_result = (1, {}, '{"created": true}')
|
||||
dsl_index_span_name = "Elasticsearch/test-index/article/2"
|
||||
dsl_index_url = "/test-index/article/2"
|
||||
dsl_search_method = "GET"
|
@ -44,10 +44,6 @@ elif major_version == 7:
|
||||
from . import helpers_es7 as helpers # pylint: disable=no-name-in-module
|
||||
elif major_version == 6:
|
||||
from . import helpers_es6 as helpers # pylint: disable=no-name-in-module
|
||||
elif major_version == 5:
|
||||
from . import helpers_es5 as helpers # pylint: disable=no-name-in-module
|
||||
else:
|
||||
from . import helpers_es2 as helpers # pylint: disable=no-name-in-module
|
||||
|
||||
Article = helpers.Article
|
||||
|
||||
|
Reference in New Issue
Block a user