From 7fbb4bdd3b73a799cc2e34da847f566ce19b7bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 10 Mar 2021 10:32:22 +0100 Subject: [PATCH] Fix TestUnpadReader on Go 1.16 --- extern/sector-storage/fr32/readers_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extern/sector-storage/fr32/readers_test.go b/extern/sector-storage/fr32/readers_test.go index 706af5fee..241195552 100644 --- a/extern/sector-storage/fr32/readers_test.go +++ b/extern/sector-storage/fr32/readers_test.go @@ -1,6 +1,7 @@ package fr32_test import ( + "bufio" "bytes" "io/ioutil" "testing" @@ -25,7 +26,8 @@ func TestUnpadReader(t *testing.T) { t.Fatal(err) } - readered, err := ioutil.ReadAll(r) + // using bufio reader to make sure reads are big enough for the padreader - it can't handle small reads right now + readered, err := ioutil.ReadAll(bufio.NewReaderSize(r, 512)) if err != nil { t.Fatal(err) }