forked from TrueCloudLab/restic
backend: Fix test compilation with Go 1.18 and 1.19
This commit is contained in:
parent
18eb1d3ab0
commit
609367195a
1 changed files with 4 additions and 4 deletions
|
@ -222,6 +222,10 @@ func (s *Suite[C]) TestLoad(t *testing.T) {
|
|||
test.OK(t, b.Remove(context.TODO(), handle))
|
||||
}
|
||||
|
||||
type setter interface {
|
||||
SetListMaxItems(int)
|
||||
}
|
||||
|
||||
// TestList makes sure that the backend implements List() pagination correctly.
|
||||
func (s *Suite[C]) TestList(t *testing.T) {
|
||||
seedRand(t)
|
||||
|
@ -269,10 +273,6 @@ func (s *Suite[C]) TestList(t *testing.T) {
|
|||
t.Run(fmt.Sprintf("max-%v", test.maxItems), func(t *testing.T) {
|
||||
list2 := make(map[restic.ID]int64)
|
||||
|
||||
type setter interface {
|
||||
SetListMaxItems(int)
|
||||
}
|
||||
|
||||
if s, ok := b.(setter); ok {
|
||||
t.Logf("setting max list items to %d", test.maxItems)
|
||||
s.SetListMaxItems(test.maxItems)
|
||||
|
|
Loading…
Reference in a new issue