mirror of
https://github.com/minio/minio.git
synced 2025-03-28 00:10:57 -04:00
add tests for default governance replication
This commit is contained in:
parent
4ed0eb7012
commit
3c1220adca
@ -175,11 +175,17 @@ mc replicate add sitec/olockbucket/ \
|
|||||||
--replicate "existing-objects,delete,delete-marker,replica-metadata-sync" --priority 3
|
--replicate "existing-objects,delete,delete-marker,replica-metadata-sync" --priority 3
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
echo "Set default governance retention 30d"
|
||||||
|
mc retention set --default governance 30d sitea/olockbucket
|
||||||
|
|
||||||
echo "Copying data to source sitea"
|
echo "Copying data to source sitea/bucket"
|
||||||
mc cp --quiet /etc/hosts sitea/bucket
|
mc cp --quiet /etc/hosts sitea/bucket
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
echo "Copying data to source sitea/olockbucket"
|
||||||
|
mc cp --quiet /etc/hosts sitea/olockbucket
|
||||||
|
sleep 1
|
||||||
|
|
||||||
echo "Verifying the metadata difference between source and target"
|
echo "Verifying the metadata difference between source and target"
|
||||||
if diff -pruN <(mc stat --json sitea/bucket/hosts | jq .) <(mc stat --json siteb/bucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then
|
if diff -pruN <(mc stat --json sitea/bucket/hosts | jq .) <(mc stat --json siteb/bucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then
|
||||||
echo "verified sitea-> COMPLETED, siteb-> REPLICA"
|
echo "verified sitea-> COMPLETED, siteb-> REPLICA"
|
||||||
@ -189,4 +195,13 @@ if diff -pruN <(mc stat --json sitea/bucket/hosts | jq .) <(mc stat --json sitec
|
|||||||
echo "verified sitea-> COMPLETED, sitec-> REPLICA"
|
echo "verified sitea-> COMPLETED, sitec-> REPLICA"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Verifying the metadata difference between source and target"
|
||||||
|
if diff -pruN <(mc stat --json sitea/olockbucket/hosts | jq .) <(mc stat --json siteb/olockbucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then
|
||||||
|
echo "verified sitea-> COMPLETED, siteb-> REPLICA"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if diff -pruN <(mc stat --json sitea/olockbucket/hosts | jq .) <(mc stat --json sitec/olockbucket/hosts | jq .) | grep -q 'COMPLETED\|REPLICA'; then
|
||||||
|
echo "verified sitea-> COMPLETED, sitec-> REPLICA"
|
||||||
|
fi
|
||||||
|
|
||||||
catch
|
catch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user