Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bring back previous change to functional test script #1045

Merged
merged 1 commit into from
Dec 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions run_functional_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
#

function run_minio_server() {
if [ -f tests/functional/minio ]; then
rm -f tests/functional/minio
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
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 @@ -34,9 +33,19 @@ function run_minio_server() {
tests/functional/minio server --config-dir tests/functional/.cfg tests/functional/.d{1...4} >tests/functional/minio.log 2>&1 &
}

run_minio_server
sleep 3
if [ -z ${SERVER_ENDPOINT+x} ]; then
harshavardhana marked this conversation as resolved.
Show resolved Hide resolved
run_minio_server
MINIO_PID=$!
trap 'kill -9 ${MINIO_PID} 2>/dev/null' INT

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
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" 2>/dev/null
fi