From b4afdac8a02f5eb9ec757b2d7c7b318083b3e667 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sun, 18 Feb 2024 12:17:51 +0100 Subject: [PATCH] fix test cases on Windows (again) in Go 1.22 Readdir now works on Windows in the same way as on other platforms Signed-off-by: Nicola Murino --- internal/common/connection_test.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/internal/common/connection_test.go b/internal/common/connection_test.go index ffd3ac78..8b9d44c2 100644 --- a/internal/common/connection_test.go +++ b/internal/common/connection_test.go @@ -1129,13 +1129,9 @@ func TestListerAt(t *testing.T) { err = lister.Close() require.NoError(t, err) n, err = lister.ListAt(files, 0) - if runtime.GOOS == "windows" { - assert.NoError(t, err) - } else { - assert.Error(t, err) - assert.NotErrorIs(t, err, io.EOF) - require.Equal(t, 0, n) - } + assert.Error(t, err) + assert.NotErrorIs(t, err, io.EOF) + require.Equal(t, 0, n) lister, err = conn.ListDir("/") require.NoError(t, err) lister.Add(vfs.NewFileInfo("..", true, 0, time.Unix(0, 0), false))