aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/replica_placement_test.go
blob: 7968af7cb0bd610b92f0c20fa884a2541f647dca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package storage

import (
	"testing"
)

func TestReplicaPlacementSerialDeserial(t *testing.T) {
	rp, _ := NewReplicaPlacementFromString("001")
	newRp, _ := NewReplicaPlacementFromByte(rp.Byte())
	if rp.String() != newRp.String() {
		println("expected:", rp.String(), "actual:", newRp.String())
		t.Fail()
	}
}