Preallocate created slice in S3 tests

In case drvr.PutContent fails and returns error we'd have
some extra memory allocated, though in this case
(test with known size of the slice being iterated), that's fine.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos 2023-09-03 23:26:32 +01:00
parent a9d31ec7b9
commit 1089800643
No known key found for this signature in database
GPG key ID: 01300E5E6D417439

View file

@ -500,8 +500,7 @@ func TestWalk(t *testing.T) {
}
// create file structure matching fileset above
// nolint:prealloc
var created []string
created := make([]string, 0, len(fileset))
for _, p := range fileset {
err := drvr.PutContent(context.Background(), p, []byte("content "+p))
if err != nil {