SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
add one unit test
Chris Lu18bfbf62fcc6
diff --git a/weed/shell/command_volume_fix_replication_test.go b/weed/shell/command_volume_fix_replication_test.goindex bb61be1ef4..4d9cd81886 100644--- a/weed/shell/command_volume_fix_replication_test.go+++ b/weed/shell/command_volume_fix_replication_test.go@@ -261,6 +261,29 @@ func TestSatisfyReplicaPlacement00x(t *testing.T) {}+func TestSatisfyReplicaPlacement100(t *testing.T) {++ var tests = []testcase{+ {+ name: "test 100",+ replication: "100",+ replicas: []*VolumeReplica{+ {+ location: &location{"dc1", "r1", &master_pb.DataNodeInfo{Id: "dn1"}},+ },+ {+ location: &location{"dc1", "r2", &master_pb.DataNodeInfo{Id: "dn2"}},+ },+ },+ possibleLocation: location{"dc2", "r3", &master_pb.DataNodeInfo{Id: "dn3"}},+ expected: true,+ },+ }++ runTests(tests, t)++}+func runTests(tests []testcase, t *testing.T) {for _, tt := range tests {replicaPlacement, _ := super_block.NewReplicaPlacementFromString(tt.replication)