frostfs-api-go/service/meta_test.go

26 lines
396 B
Go
Raw Normal View History

2019-11-18 16:22:08 +00:00
package service
import (
"testing"
"github.com/stretchr/testify/require"
)
2020-05-04 11:37:14 +00:00
func TestCutRestoreMeta(t *testing.T) {
items := []func() SeizedMetaHeaderContainer{
func() SeizedMetaHeaderContainer {
m := new(RequestMetaHeader)
m.SetEpoch(1)
return m
},
}
2020-05-04 11:37:14 +00:00
for _, item := range items {
v1 := item()
m1 := v1.CutMeta()
v1.RestoreMeta(m1)
2020-05-04 11:37:14 +00:00
require.Equal(t, item(), v1)
}
}