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
package weed_server
import "testing"
func TestStatisticsReplication(t *testing.T) {
fs := &FilerServer{option: &FilerOption{DefaultReplication: "001"}}
if got := fs.statisticsReplication("020"); got != "020" {
t.Errorf("requested replication: got %q, want %q", got, "020")
}
if got := fs.statisticsReplication(""); got != "001" {
t.Errorf("empty replication: got %q, want the filer default %q", got, "001")
}
// a filer without its own default leaves the choice to the master
fs.option.DefaultReplication = ""
if got := fs.statisticsReplication(""); got != "" {
t.Errorf("empty replication without a filer default: got %q, want %q", got, "")
}
}