[#195] Use exp epoch attribute instead of tick

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-03-17 17:03:06 +03:00 committed by Angira Kekteeva
parent cfcc8933e4
commit 9d19acadcd
4 changed files with 15 additions and 35 deletions

View file

@ -33,15 +33,12 @@ func TestObjectLockAttributes(t *testing.T) {
lockObj := tc.getSystemObject(obj.RetentionObject())
require.NotNil(t, lockObj)
tickTopic, tickEpoch := false, false
expEpoch := false
for _, attr := range lockObj.Attributes() {
if attr.Key() == AttributeSysTickEpoch {
tickEpoch = true
} else if attr.Key() == AttributeSysTickTopic {
tickTopic = true
if attr.Key() == AttributeExpirationEpoch {
expEpoch = true
}
}
require.Truef(t, tickTopic, "system header __NEOFS__TICK_TOPIC presence")
require.Truef(t, tickEpoch, "system header __NEOFS__TICK_EPOCH presence")
require.Truef(t, expEpoch, "system header __NEOFS__EXPIRATION_EPOCH presence")
}