diff --git a/internal/sftpd/internal_test.go b/internal/sftpd/internal_test.go index c97a8ac1..28ccd137 100644 --- a/internal/sftpd/internal_test.go +++ b/internal/sftpd/internal_test.go @@ -1726,7 +1726,7 @@ func TestSCPUploadFiledata(t *testing.T) { transfer.Connection.AddTransfer(transfer) err = scpCommand.getUploadFileData(2, transfer) - assert.True(t, errors.Is(err, os.ErrClosed)) + assert.ErrorContains(t, err, os.ErrClosed.Error()) err = os.Remove(testfile) assert.NoError(t, err)