Browse Source

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 <[email protected]>
Nicola Murino 1 year ago
parent
commit
b4afdac8a0
1 changed files with 3 additions and 7 deletions
  1. 3 7
      internal/common/connection_test.go

+ 3 - 7
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))