Files
qdrant/tests/openapi_integration_test.sh
Tim Visée a10326ab24 Tag OpenAPI integration test image, run in interactive mode (#2784)
* Tag OpenAPI test image to add to Docker engine images on some platforms

* Run OpenAPI integration test in interactive mode if TTY

If currently in a TTY, run the OpenAPI integration test Docker image
with -it flags.

This allows users to abort the test with SIGINT and shows fancy output
colors.
2023-10-12 15:45:09 +02:00

19 lines
453 B
Bash
Executable File

#!/bin/bash
set -ex
# Ensure current path is project root
cd "$(dirname "$0")/../"
cp docs/redoc/master/openapi.json openapi/tests/openapi.json
docker buildx build --load -q ./openapi/tests --tag=qdrant_openapi_test
DOCKER_ARGS=$([ -t 0 ] && echo "-it" || echo "")
docker run $DOCKER_ARGS \
--rm \
--network=host \
-e OPENAPI_FILE='openapi.json' \
-v "${PWD}"/openapi/tests:/code \
qdrant_openapi_test sh -c /code/run_docker.sh