[v4] fix out-of-bounds behavior in seeker buffer and add tests (#219)
Some checks failed
coverage / build (push) Failing after 2m12s
test / test (push) Successful in 4m27s
sync / sync (push) Successful in 7s

* add check negative position to Read() and write tests

* add tests for Write() method

* add tests for Write() method

* add checks of whence and negative position to Seek() and write tests

* add tests for Rewind()

* add tests for Close()

* add tests for Reset()

* add tests for Len()

* add tests for Bytes()

* tests polishing

* tests polishing

* tests polishing

* tests polishing
This commit is contained in:
2025-06-15 19:24:48 +05:00
committed by GitHub
parent 0e668c0f0f
commit 3deb572f72
4 changed files with 412 additions and 49 deletions

View File

@@ -2,6 +2,7 @@ package store
import (
"context"
"errors"
"testing"
)
@@ -25,7 +26,8 @@ func TestHook(t *testing.T) {
t.Fatal(err)
}
if err := s.Exists(context.TODO(), "test"); err != nil {
err := s.Exists(context.TODO(), "test")
if !errors.Is(err, ErrNotFound) {
t.Fatal(err)
}