mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
b410dc76aa
- Create a new docker-compose file to start an Elasticsearch instance for integration tests. - Add new tests to `test_elasticsearch.py` to verify Elasticsearch functionality. - Include an optional group `test_integration` in the `pyproject.toml` file. This group should contain dependencies for integration tests and can be installed using the command `poetry install --with test_integration`. Any new dependencies should be added by running `poetry add some_new_deps --group "test_integration" ` Note: New tests running in live mode, which involve end-to-end testing of the OpenAI API. In the future, adding `pytest-vcr` to record and replay all API requests would be a nice feature for testing process.More info: https://pytest-vcr.readthedocs.io/en/latest/ Fixes https://github.com/hwchase17/langchain/issues/2386
31 lines
882 B
YAML
31 lines
882 B
YAML
version: "3"
|
|
|
|
services:
|
|
elasticsearch:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:8.7.0
|
|
environment:
|
|
- discovery.type=single-node
|
|
- xpack.security.enabled=false
|
|
- xpack.security.http.ssl.enabled=false
|
|
- ELASTIC_PASSWORD=password
|
|
ports:
|
|
- "9200:9200"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "curl --silent --fail http://localhost:9200/_cluster/health || exit 1" ]
|
|
interval: 1s
|
|
retries: 360
|
|
|
|
kibana:
|
|
image: docker.elastic.co/kibana/kibana:8.7.0
|
|
environment:
|
|
- ELASTICSEARCH_URL=http://elasticsearch:9200
|
|
- ELASTICSEARCH_USERNAME=kibana_system
|
|
- ELASTICSEARCH_PASSWORD=password
|
|
- KIBANA_PASSWORD=password
|
|
ports:
|
|
- "5601:5601"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "curl --silent --fail http://localhost:5601/login || exit 1" ]
|
|
interval: 10s
|
|
retries: 60
|