File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
test_elasticsearch_serverless Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,7 @@ def es_url() -> str:
30
30
"""Grabs an Elasticsearch URL that must be designated via
31
31
an environment variable, otherwise raises an exception.
32
32
"""
33
-
34
- # Try user-supplied URLs before generic localhost ones.
35
- url = os .environ .get ("ELASTICSEARCH_URL" , None )
36
- if url is None :
37
- raise ValueError ("ELASTICSEARCH_URL environment variable is required" )
38
-
39
- return url
33
+ return os .environ .get ("ELASTICSEARCH_URL" , "http://elastic:changeme@localhost:9200" )
40
34
41
35
42
36
def es_version (client ) -> Tuple [int , ...]:
@@ -199,9 +193,4 @@ def es_api_key() -> str:
199
193
"""
200
194
Gets Elasticsearch API key ID and secret from environment variables, raises ValueError if none found
201
195
"""
202
- api_key = os .environ .get ("ES_API_KEY" , None )
203
-
204
- if api_key is None :
205
- raise ValueError ("ES_API_KEY environment variable is required" )
206
-
207
- return api_key
196
+ return os .environ .get ("ES_API_KEY" , "abcd1234" )
You can’t perform that action at this time.
0 commit comments