mirror of
https://github.com/qdrant/qdrant-client.git
synced 2026-07-30 06:31:00 -05:00
* Enable testing on windows and macos * Add platform to the name * Add Docker on MacOS * Temporarily disable tests on Windows * Explicitly set ports to be opened * Add problematic case for MacOS * Increase the timeout in tests
46 lines
992 B
Bash
Executable File
46 lines
992 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
function stop_docker()
|
|
{
|
|
echo "stopping qdrant_test"
|
|
docker stop qdrant_test
|
|
}
|
|
|
|
# Ensure current path is project root
|
|
cd "$(dirname "$0")/../"
|
|
|
|
QDRANT_LATEST="v1.3.0"
|
|
QDRANT_VERSION=${QDRANT_VERSION:-"$QDRANT_LATEST"}
|
|
|
|
QDRANT_HOST='localhost:6333'
|
|
|
|
docker run -d --rm \
|
|
-p "6333:6333" \
|
|
-p "6334:6334" \
|
|
-e QDRANT__SERVICE__GRPC_PORT="6334" \
|
|
--name qdrant_test qdrant/qdrant:${QDRANT_VERSION}
|
|
|
|
trap stop_docker SIGINT
|
|
trap stop_docker ERR
|
|
|
|
until $(curl --output /dev/null --silent --get --fail http://$QDRANT_HOST/collections); do
|
|
printf 'waiting for server to start...'
|
|
sleep 5
|
|
done
|
|
|
|
# If running backwards compatibility tests, skip local compatibility tests
|
|
# Backwards compatibility tests are enabled by setting QDRANT_VERSION to a version that is not the latest
|
|
|
|
if [ "$QDRANT_VERSION" != "$QDRANT_LATEST" ]; then
|
|
pytest --ignore=tests/congruence_tests
|
|
else
|
|
pytest
|
|
fi
|
|
|
|
|
|
echo "Ok, that is enough"
|
|
|
|
stop_docker
|