[#1634] node: Change default epoch in tests

Do not treat objects with expiration as expired by default.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-09-09 13:27:15 +03:00 committed by LeL
parent edef26a4fd
commit beb7f2a048
5 changed files with 5 additions and 10 deletions

View file

@ -2,7 +2,6 @@ package engine
import (
"fmt"
"math"
"os"
"path/filepath"
"testing"
@ -31,7 +30,7 @@ import (
type epochState struct{}
func (s epochState) CurrentEpoch() uint64 {
return math.MaxUint64
return 0
}
func BenchmarkExists(b *testing.B) {

View file

@ -1,7 +1,6 @@
package meta_test
import (
"math"
"os"
"strconv"
"testing"
@ -29,7 +28,7 @@ func (s epochState) CurrentEpoch() uint64 {
return s.e
}
return math.MaxUint64
return 0
}
// saves "big" object in DB.

View file

@ -4,7 +4,6 @@ import (
"encoding/binary"
"errors"
"fmt"
"math"
"path/filepath"
"testing"
@ -15,7 +14,7 @@ import (
type epochStateImpl struct{}
func (s epochStateImpl) CurrentEpoch() uint64 {
return math.MaxUint64
return 0
}
func TestVersion(t *testing.T) {

View file

@ -1,7 +1,6 @@
package shard
import (
"math"
"os"
"path/filepath"
"testing"
@ -28,7 +27,7 @@ import (
type epochState struct{}
func (s epochState) CurrentEpoch() uint64 {
return math.MaxUint64
return 0
}
func TestShardOpen(t *testing.T) {

View file

@ -2,7 +2,6 @@ package shard_test
import (
"crypto/sha256"
"math"
"math/rand"
"path/filepath"
"testing"
@ -30,7 +29,7 @@ import (
type epochState struct{}
func (s epochState) CurrentEpoch() uint64 {
return math.MaxUint64
return 0
}
func newShard(t testing.TB, enableWriteCache bool) *shard.Shard {