Files
qdrant/tests/openapi/helpers/settings.py
Predrag Knezevic 7fef49af03 Enable running integration tests against non-localhost available instance (#5345)
* `QDRANT_HOST` variable is used by all openapi tests, removed its copies from
  `test_multi_vector_uint8.py`, `test_multi_vector_unnamed.py`, `test_query.py`,
  `test_shard_snapshot.py`, and `test_snapshot.py`
* Added optional `QDRANT_HOST_HEADERS` env variable to set custom HTTP headers
  in order to reach Qdrant instance behind a reverse proxy. The content of the
  variable is JSON payload, e.g. `{"host": "qdrant.local"}`
* Adapted `./tests/basic_*.sh` scripts to aware of `QDRANT_HOST_HEADERS` env variable
2024-10-31 18:30:41 +01:00

12 lines
388 B
Python

import os
import schemathesis
ROOT_DIR = os.path.dirname(__file__)
OPENAPI_FILE = os.environ.get("OPENAPI_FILE", os.path.join(os.path.dirname(ROOT_DIR), '../../docs/redoc/master', 'openapi.json'))
SCHEMA = schemathesis.from_file(open(OPENAPI_FILE))
QDRANT_HOST = os.environ.get("QDRANT_HOST", "http://localhost:6333")
QDRANT_HOST_HEADERS = os.environ.get("QDRANT_HOST_HEADERS", "{}")