frostfs-api-go-pogpp/service/meta_test.go
2020-05-04 14:37:14 +03:00

25 lines
396 B
Go

package service
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestCutRestoreMeta(t *testing.T) {
items := []func() SeizedMetaHeaderContainer{
func() SeizedMetaHeaderContainer {
m := new(RequestMetaHeader)
m.SetEpoch(1)
return m
},
}
for _, item := range items {
v1 := item()
m1 := v1.CutMeta()
v1.RestoreMeta(m1)
require.Equal(t, item(), v1)
}
}