From 609367195a28031f9c10962e4adba49768e07dae Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 18 May 2023 20:38:43 +0200 Subject: [PATCH] backend: Fix test compilation with Go 1.18 and 1.19 --- internal/backend/test/tests.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/backend/test/tests.go b/internal/backend/test/tests.go index 9851bf184..c4462495f 100644 --- a/internal/backend/test/tests.go +++ b/internal/backend/test/tests.go @@ -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)