mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-24 17:47:57 +08:00
5ce6bbf076
glide has its own requirements. My previous workaround caused me some code checkin errors. Need to fix this.
24 lines
403 B
Go
24 lines
403 B
Go
package storage
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestSuperBlockReadWrite(t *testing.T) {
|
|
rp, _ := NewReplicaPlacementFromByte(byte(001))
|
|
ttl, _ := ReadTTL("15d")
|
|
s := &SuperBlock{
|
|
version: CurrentVersion,
|
|
ReplicaPlacement: rp,
|
|
Ttl: ttl,
|
|
}
|
|
|
|
bytes := s.Bytes()
|
|
|
|
if !(bytes[2] == 15 && bytes[3] == Day) {
|
|
println("byte[2]:", bytes[2], "byte[3]:", bytes[3])
|
|
t.Fail()
|
|
}
|
|
|
|
}
|