Skip to content

Commit

Permalink
fix: running functional tests issues
Browse files Browse the repository at this point in the history
  • Loading branch information
minio-trusted committed Dec 8, 2020
1 parent b1cc95a commit c09f56f
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions run_functional_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
#

function run_minio_server() {
if [ ! -f tests/functional/minio ]; then
wget --quiet -output-document tests/functional/minio https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x tests/functional/minio
if [ -f tests/functional/minio ]; then
rm -f tests/functional/minio
fi
wget --quiet --output-document tests/functional/minio https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x tests/functional/minio

export MINIO_ACCESS_KEY=minio
export MINIO_SECRET_KEY=minio123
Expand All @@ -33,19 +34,9 @@ function run_minio_server() {
tests/functional/minio server --config-dir tests/functional/.cfg tests/functional/.d{1...4} >tests/functional/minio.log 2>&1 &
}

if [ -z ${SERVER_ENDPOINT+x} ]; then
run_minio_server
MINIO_PID=$!
trap "kill -9 $MINIO_PID" INT
run_minio_server
sleep 3

export MINT_MODE=full
export SERVER_ENDPOINT=localhost:9000
export ACCESS_KEY=minio
export SECRET_KEY=minio123
export ENABLE_HTTPS=0
fi

PYTHONPATH=$PWD python tests/functional/tests.py
if [ -n "$MINIO_PID" ]; then
kill -9 "$MINIO_PID"
fi
pip install --user .
SECRET_KEY=minio123 ACCESS_KEY=minio SERVER_ENDPOINT=localhost:9000 ENABLE_HTTPS=0 MINT_MODE=full PYTHONPATH=$PWD python tests/functional/tests.py
pkill -9 minio

0 comments on commit c09f56f

Please sign in to comment.