1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-30 17:15:36 +02:00

soft-deprecated and replaced GetFile with GetReader

This commit is contained in:
Gani Georgiev
2025-05-02 11:26:06 +03:00
parent 87c6c5b483
commit 5dbd9821e8
5 changed files with 3021 additions and 3009 deletions

View File

@@ -526,7 +526,7 @@ func TestFileSystemServe(t *testing.T) {
}
}
func TestFileSystemGetFile(t *testing.T) {
func TestFileSystemGetReader(t *testing.T) {
dir := createTestDir(t)
defer os.RemoveAll(dir)
@@ -547,7 +547,7 @@ func TestFileSystemGetFile(t *testing.T) {
for _, s := range scenarios {
t.Run(s.file, func(t *testing.T) {
f, err := fsys.GetFile(s.file)
f, err := fsys.GetReader(s.file)
defer func() {
if f != nil {
f.Close()
@@ -600,7 +600,7 @@ func TestFileSystemCopy(t *testing.T) {
if err := fsys.Copy(src, dst); err != nil {
t.Fatalf("Failed to copy %q to %q: %v", src, dst, err)
}
f, err := fsys.GetFile(dst)
f, err := fsys.GetReader(dst)
//nolint
defer f.Close()
if err != nil {
@@ -801,7 +801,7 @@ func TestFileSystemCreateThumb(t *testing.T) {
return
}
f, err := fsys.GetFile(s.thumb)
f, err := fsys.GetReader(s.thumb)
if err != nil {
t.Fatalf("Missing expected thumb %s (%v)", s.thumb, err)
}