seaweedfs/weed/storage/super_block/replica_placement_test.go

15 lines
314 B
Go
Raw Normal View History

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