mirror of https://github.com/minio/minio.git
Fix test scripts to use mc ready (#19768)
This commit is contained in:
parent
4e2d39293a
commit
e947a844c9
|
@ -32,6 +32,7 @@ fi
|
|||
set +e
|
||||
|
||||
export MC_HOST_minioadm=http://minioadmin:minioadmin@localhost:9100/
|
||||
./mc ready minioadm
|
||||
|
||||
./mc ls minioadm/
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ create_iam_content_in_old_minio() {
|
|||
|
||||
set -x
|
||||
mc alias set old-minio http://localhost:9000 minioadmin minioadmin
|
||||
mc ready old-minio
|
||||
mc idp ldap add old-minio \
|
||||
server_addr=localhost:1389 \
|
||||
server_insecure=on \
|
||||
|
@ -87,6 +88,7 @@ import_iam_content_in_new_minio() {
|
|||
set -x
|
||||
mc alias set new-minio http://localhost:9000 minioadmin minioadmin
|
||||
echo "BEFORE IMPORT mappings:"
|
||||
mc ready new-minio
|
||||
mc idp ldap policy entities new-minio
|
||||
mc admin cluster iam import new-minio ./old-minio-iam-info.zip
|
||||
echo "AFTER IMPORT mappings:"
|
||||
|
|
|
@ -59,6 +59,9 @@ sleep 3
|
|||
export MC_HOST_myminio1=http://minioadmin:minioadmin@localhost:9001
|
||||
export MC_HOST_myminio2=http://minioadmin:minioadmin@localhost:9002
|
||||
|
||||
./mc ready myminio1
|
||||
./mc ready myminio2
|
||||
|
||||
./mc mb myminio1/testbucket/
|
||||
./mc version enable myminio1/testbucket/
|
||||
./mc mb myminio2/testbucket/
|
||||
|
|
|
@ -56,11 +56,12 @@ minio server --address 127.0.0.1:9003 "http://127.0.0.1:9003/tmp/multisiteb/data
|
|||
minio server --address 127.0.0.1:9004 "http://127.0.0.1:9003/tmp/multisiteb/data/disterasure/xl{1...4}" \
|
||||
"http://127.0.0.1:9004/tmp/multisiteb/data/disterasure/xl{5...8}" >/tmp/siteb_2.log 2>&1 &
|
||||
|
||||
sleep 10s
|
||||
|
||||
export MC_HOST_sitea=http://minio:minio123@127.0.0.1:9001
|
||||
export MC_HOST_siteb=http://minio:minio123@127.0.0.1:9004
|
||||
|
||||
./mc ready sitea
|
||||
./mc ready siteb
|
||||
|
||||
./mc mb sitea/bucket
|
||||
|
||||
## Create 100 files
|
||||
|
|
|
@ -68,12 +68,14 @@ minio server --address 127.0.0.1:9005 "http://127.0.0.1:9005/tmp/multisitec/data
|
|||
minio server --address 127.0.0.1:9006 "http://127.0.0.1:9005/tmp/multisitec/data/disterasure/xl{1...4}" \
|
||||
"http://127.0.0.1:9006/tmp/multisitec/data/disterasure/xl{5...8}" >/tmp/sitec_2.log 2>&1 &
|
||||
|
||||
sleep 30
|
||||
|
||||
export MC_HOST_sitea=http://minio:minio123@127.0.0.1:9001
|
||||
export MC_HOST_siteb=http://minio:minio123@127.0.0.1:9004
|
||||
export MC_HOST_sitec=http://minio:minio123@127.0.0.1:9006
|
||||
|
||||
./mc ready sitea
|
||||
./mc ready siteb
|
||||
./mc ready sitec
|
||||
|
||||
./mc mb sitea/bucket
|
||||
./mc version enable sitea/bucket
|
||||
./mc mb -l sitea/olockbucket
|
||||
|
|
|
@ -67,13 +67,17 @@ minio server --address 127.0.0.1:9008 "http://127.0.0.1:9007/tmp/multisited/data
|
|||
"http://127.0.0.1:9008/tmp/multisited/data/disterasure/xl{5...8}" >/tmp/sited_2.log 2>&1 &
|
||||
|
||||
# Wait to make sure all MinIO instances are up
|
||||
sleep 30s
|
||||
|
||||
export MC_HOST_sitea=http://minio:minio123@127.0.0.1:9001
|
||||
export MC_HOST_siteb=http://minio:minio123@127.0.0.1:9004
|
||||
export MC_HOST_sitec=http://minio:minio123@127.0.0.1:9006
|
||||
export MC_HOST_sited=http://minio:minio123@127.0.0.1:9008
|
||||
|
||||
./mc ready sitea
|
||||
./mc ready siteb
|
||||
./mc ready sitec
|
||||
./mc ready sited
|
||||
|
||||
./mc mb sitea/bucket
|
||||
./mc mb sitec/bucket
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ sleep 10
|
|||
./mc alias set myminio1 http://localhost:9001 minioadmin minioadmin
|
||||
./mc alias set myminio2 http://localhost:9101 minioadmin minioadmin
|
||||
|
||||
./mc ready myminio1
|
||||
./mc ready myminio2
|
||||
sleep 1
|
||||
|
||||
./mc mb myminio1/testbucket/ --with-lock
|
||||
|
|
|
@ -46,8 +46,6 @@ minio server -S /tmp/no-certs --address ":9001" "http://localhost:9001/tmp/multi
|
|||
minio server -S /tmp/no-certs --address ":9002" "http://localhost:9001/tmp/multisitea/data/disterasure/xl{1...4}" \
|
||||
"http://localhost:9002/tmp/multisitea/data/disterasure/xl{5...8}" >/tmp/sitea_2.log 2>&1 &
|
||||
|
||||
sleep 5
|
||||
|
||||
export MC_HOST_sitea=http://minioadmin:minioadmin@localhost:9002
|
||||
|
||||
./mc ready sitea
|
||||
|
|
|
@ -24,7 +24,7 @@ export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
|||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
pid=$!
|
||||
|
||||
sleep 30
|
||||
./mc ready myminio
|
||||
|
||||
./mc admin user add myminio/ minio123 minio123
|
||||
./mc admin user add myminio/ minio12345 minio12345
|
||||
|
@ -59,6 +59,7 @@ pid_1=$!
|
|||
pid_2=$!
|
||||
|
||||
sleep 30
|
||||
./mc ready myminio
|
||||
|
||||
expanded_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
expanded_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
@ -100,10 +101,10 @@ sleep 5
|
|||
(minio server --address ":9001" http://localhost:9001/tmp/xl/{11...30}/disk{0...3} 2>&1 >/tmp/removed.log) &
|
||||
pid=$!
|
||||
|
||||
sleep 30
|
||||
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9001/"
|
||||
|
||||
./mc ready myminio
|
||||
|
||||
decom_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
decom_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
|||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
pid=$!
|
||||
|
||||
sleep 30s
|
||||
./mc ready myminio
|
||||
|
||||
./mc admin user add myminio/ minio123 minio123
|
||||
./mc admin user add myminio/ minio12345 minio12345
|
||||
|
@ -80,7 +80,7 @@ pid_1=$!
|
|||
(minio server --address ":9001" http://localhost:9000/tmp/xl/{1...10}/disk{0...1} http://localhost:9001/tmp/xl/{11...30}/disk{0...3} 2>&1 >/tmp/expanded_2.log) &
|
||||
pid_2=$!
|
||||
|
||||
sleep 30s
|
||||
./mc ready myminio
|
||||
|
||||
expanded_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
expanded_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
@ -150,6 +150,8 @@ sleep 30s
|
|||
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9001/"
|
||||
|
||||
./mc ready myminio
|
||||
|
||||
decom_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
decom_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
|||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
pid=$!
|
||||
|
||||
sleep 30
|
||||
./mc ready myminio
|
||||
|
||||
./mc admin user add myminio/ minio123 minio123
|
||||
./mc admin user add myminio/ minio12345 minio12345
|
||||
|
@ -55,7 +55,7 @@ pid_1=$!
|
|||
(minio server --address ":9001" http://localhost:9000/tmp/xl/{1...10}/disk{0...1} http://localhost:9001/tmp/xl/{11...30}/disk{0...3} 2>&1 >/tmp/expanded_2.log) &
|
||||
pid_2=$!
|
||||
|
||||
sleep 30
|
||||
./mc ready myminio
|
||||
|
||||
expanded_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
expanded_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
@ -104,10 +104,10 @@ sleep 5
|
|||
(minio server --address ":9001" http://localhost:9001/tmp/xl/{11...30}/disk{0...3} 2>&1 >/tmp/removed.log) &
|
||||
pid=$!
|
||||
|
||||
sleep 30
|
||||
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9001/"
|
||||
|
||||
./mc ready myminio
|
||||
|
||||
decom_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
decom_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ export MINIO_KMS_SECRET_KEY=my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl
|
|||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
pid=$!
|
||||
|
||||
sleep 30
|
||||
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
||||
|
||||
./mc ready myminio
|
||||
|
||||
./mc admin user add myminio/ minio123 minio123
|
||||
./mc admin user add myminio/ minio12345 minio12345
|
||||
|
||||
|
@ -55,7 +55,7 @@ pid_1=$!
|
|||
(minio server --address ":9001" http://localhost:9000/tmp/xl/{1...10}/disk{0...1} http://localhost:9001/tmp/xl/{11...30}/disk{0...3} 2>&1 >/tmp/expanded_2.log) &
|
||||
pid_2=$!
|
||||
|
||||
sleep 30
|
||||
./mc ready myminio
|
||||
|
||||
expanded_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
expanded_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
@ -97,10 +97,10 @@ sleep 5
|
|||
(minio server --address ":9001" http://localhost:9001/tmp/xl/{11...30}/disk{0...3} 2>&1 >/tmp/removed.log) &
|
||||
pid=$!
|
||||
|
||||
sleep 30
|
||||
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9001/"
|
||||
|
||||
./mc ready myminio
|
||||
|
||||
decom_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
decom_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ export MINIO_SCANNER_SPEED=fastest
|
|||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/tmp/decom.log) &
|
||||
pid=$!
|
||||
|
||||
sleep 30
|
||||
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
||||
|
||||
./mc ready myminio
|
||||
|
||||
./mc admin user add myminio/ minio123 minio123
|
||||
./mc admin user add myminio/ minio12345 minio12345
|
||||
|
||||
|
@ -49,10 +49,11 @@ policy_count=$(./mc admin policy list myminio/ | wc -l)
|
|||
|
||||
## create a warm tier instance
|
||||
(minio server /tmp/xltier/{1...4}/disk{0...1} --address :9002 2>&1 >/dev/null) &
|
||||
sleep 30
|
||||
|
||||
export MC_HOST_mytier="http://minioadmin:minioadmin@localhost:9002/"
|
||||
|
||||
./mc ready myminio
|
||||
|
||||
./mc mb -l myminio/bucket2
|
||||
./mc mb -l mytier/tiered
|
||||
|
||||
|
@ -77,7 +78,7 @@ pid_1=$!
|
|||
(minio server --address ":9001" http://localhost:9000/tmp/xl/{1...10}/disk{0...1} http://localhost:9001/tmp/xl/{11...30}/disk{0...3} 2>&1 >/tmp/expanded_2.log) &
|
||||
pid_2=$!
|
||||
|
||||
sleep 30
|
||||
./mc ready myminio
|
||||
|
||||
expanded_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
expanded_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
@ -124,10 +125,11 @@ sleep 5
|
|||
(minio server --address ":9001" http://localhost:9001/tmp/xl/{11...30}/disk{0...3} 2>&1 >/tmp/removed.log) &
|
||||
pid=$!
|
||||
|
||||
sleep 30
|
||||
|
||||
sleep 5
|
||||
export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9001/"
|
||||
|
||||
./mc ready myminio
|
||||
|
||||
decom_user_count=$(./mc admin user list myminio/ | wc -l)
|
||||
decom_policy_count=$(./mc admin policy list myminio/ | wc -l)
|
||||
|
||||
|
|
|
@ -58,8 +58,6 @@ site3_pid=$!
|
|||
minio server --config /tmp/minio.configfile.4 >/tmp/minio4_1.log 2>&1 &
|
||||
site4_pid=$!
|
||||
|
||||
sleep 30
|
||||
|
||||
export MC_HOST_minio1=http://minr0otUS2r:pBU94AGAY85e@localhost:9001
|
||||
export MC_HOST_minio3=http://minr0otUS2r:pBU94AGAY85e@localhost:9003
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ export MC_HOST_myminio="http://minioadmin:minioadmin@localhost:9000/"
|
|||
(minio server http://localhost:9000/tmp/xl/{1...10}/disk{0...1} 2>&1 >/dev/null) &
|
||||
pid=$!
|
||||
|
||||
sleep 30s
|
||||
./mc ready myminio
|
||||
|
||||
./mc admin user add myminio/ minio123 minio123
|
||||
|
||||
|
|
|
@ -59,12 +59,14 @@ site2_pid=$!
|
|||
minio server --config-dir /tmp/minio-ldap --address ":9003" /tmp/minio-ldap-idp3/{1...4} >/tmp/minio3_1.log 2>&1 &
|
||||
site3_pid=$!
|
||||
|
||||
sleep 10
|
||||
|
||||
export MC_HOST_minio1=http://minio:minio123@localhost:9001
|
||||
export MC_HOST_minio2=http://minio:minio123@localhost:9002
|
||||
export MC_HOST_minio3=http://minio:minio123@localhost:9003
|
||||
|
||||
./mc ready minio1
|
||||
./mc ready minio2
|
||||
./mc ready minio3
|
||||
|
||||
./mc admin replicate add minio1 minio2 minio3
|
||||
|
||||
./mc idp ldap policy attach minio1 consoleAdmin --user="uid=dillon,ou=people,ou=swengg,dc=min,dc=io"
|
||||
|
|
|
@ -59,8 +59,6 @@ site3_pid1=$!
|
|||
minio server --config-dir /tmp/minio-internal --address ":9030" http://localhost:9003/tmp/minio-internal-idp3/{1...4} http://localhost:9030/tmp/minio-internal-idp3/{5...8} >/tmp/minio3_2.log 2>&1 &
|
||||
site3_pid2=$!
|
||||
|
||||
sleep 10
|
||||
|
||||
export MC_HOST_minio1=http://minio:minio123@localhost:9001
|
||||
export MC_HOST_minio2=http://minio:minio123@localhost:9002
|
||||
export MC_HOST_minio3=http://minio:minio123@localhost:9003
|
||||
|
@ -69,6 +67,13 @@ export MC_HOST_minio10=http://minio:minio123@localhost:9010
|
|||
export MC_HOST_minio20=http://minio:minio123@localhost:9020
|
||||
export MC_HOST_minio30=http://minio:minio123@localhost:9030
|
||||
|
||||
./mc ready minio1
|
||||
./mc ready minio2
|
||||
./mc ready minio3
|
||||
./mc ready minio10
|
||||
./mc ready minio20
|
||||
./mc ready minio30
|
||||
|
||||
./mc admin replicate add minio1 minio2
|
||||
|
||||
site_enabled=$(./mc admin replicate info minio1)
|
||||
|
|
|
@ -57,12 +57,14 @@ if [ ! -f ./mc ]; then
|
|||
chmod +x mc
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
export MC_HOST_minio1=http://minio:minio123@localhost:9001
|
||||
export MC_HOST_minio2=http://minio:minio123@localhost:9002
|
||||
export MC_HOST_minio3=http://minio:minio123@localhost:9003
|
||||
|
||||
./mc ready minio1
|
||||
./mc ready minio2
|
||||
./mc ready minio3
|
||||
|
||||
./mc admin replicate add minio1 minio2 minio3
|
||||
|
||||
./mc admin policy create minio1 projecta ./docs/site-replication/rw.json
|
||||
|
|
|
@ -51,11 +51,12 @@ if [ ! -f ./mc ]; then
|
|||
echo "done"
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
export MC_HOST_minio1=https://minio:minio123@localhost:9001
|
||||
export MC_HOST_minio2=https://minio:minio123@localhost:9002
|
||||
|
||||
./mc ready minio1 --insecure
|
||||
./mc ready minio2 --insecure
|
||||
|
||||
# Prepare data for tests
|
||||
echo -n "Preparing test data ..."
|
||||
mkdir -p /tmp/data
|
||||
|
|
|
@ -50,11 +50,12 @@ if [ ! -f ./mc ]; then
|
|||
echo "done"
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
export MC_HOST_minio1=https://minio:minio123@localhost:9001
|
||||
export MC_HOST_minio2=https://minio:minio123@localhost:9002
|
||||
|
||||
./mc ready minio1 --insecure
|
||||
./mc ready minio2 --insecure
|
||||
|
||||
# Prepare data for tests
|
||||
echo -n "Preparing test data ..."
|
||||
mkdir -p /tmp/data
|
||||
|
|
|
@ -50,11 +50,12 @@ if [ ! -f ./mc ]; then
|
|||
echo "done"
|
||||
fi
|
||||
|
||||
sleep 10
|
||||
|
||||
export MC_HOST_minio1=https://minio:minio123@localhost:9001
|
||||
export MC_HOST_minio2=https://minio:minio123@localhost:9002
|
||||
|
||||
./mc ready minio1 --insecure
|
||||
./mc ready minio2 --insecure
|
||||
|
||||
# Prepare data for tests
|
||||
echo -n "Preparing test data ..."
|
||||
mkdir -p /tmp/data
|
||||
|
|
Loading…
Reference in New Issue