seaweedfs/weed/storage/replica_placement_test.go

15 lines
310 B
Go
Raw Normal View History

package storage
import (
"testing"
)
2019-01-17 01:17:19 +00:00
func TestReplicaPlacementSerialDeserial(t *testing.T) {
rp, _ := NewReplicaPlacementFromString("001")
2019-01-17 01:17:19 +00:00
newRp, _ := NewReplicaPlacementFromByte(rp.Byte())
if rp.String() != newRp.String() {
println("expected:", rp.String(), "actual:", newRp.String())
t.Fail()
}
}