mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-09-16 19:40:46 +02:00
backported fixes for go 1.27
This commit is contained in:
@@ -48,7 +48,7 @@ func TestCreateSuccess(t *testing.T) {
|
||||
t.Fatalf("Expected zip with name %q, got %q", zipName, name)
|
||||
}
|
||||
|
||||
expectedSize := int64(544)
|
||||
expectedSize := int64(532)
|
||||
if size := info.Size(); size != expectedSize {
|
||||
t.Fatalf("Expected zip with size %d, got %d", expectedSize, size)
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ func TestNewFileFromPath(t *testing.T) {
|
||||
if match, err := regexp.Match(normalizedNamePattern, []byte(f.Name)); !match {
|
||||
t.Fatalf("Expected Name to match %v, got %q (%v)", normalizedNamePattern, f.Name, err)
|
||||
}
|
||||
if f.Size != 73 {
|
||||
t.Fatalf("Expected Size %v, got %v", 73, f.Size)
|
||||
if f.Size != 77 {
|
||||
t.Fatalf("Expected Size %v, got %v", 77, f.Size)
|
||||
}
|
||||
if _, ok := f.Reader.(*filesystem.PathReader); !ok {
|
||||
t.Fatalf("Expected Reader to be PathReader, got %v", f.Reader)
|
||||
|
||||
@@ -368,7 +368,7 @@ func TestFileSystemServe(t *testing.T) {
|
||||
map[string]string{
|
||||
"Content-Disposition": "inline; filename=test_name.png",
|
||||
"Content-Type": "image/png",
|
||||
"Content-Length": "73",
|
||||
"Content-Length": "77",
|
||||
"Content-Security-Policy": csp,
|
||||
"Cache-Control": cacheControl,
|
||||
},
|
||||
@@ -383,7 +383,7 @@ func TestFileSystemServe(t *testing.T) {
|
||||
map[string]string{
|
||||
"Content-Disposition": "attachment; filename=test_name_download.png",
|
||||
"Content-Type": "image/png",
|
||||
"Content-Length": "73",
|
||||
"Content-Length": "77",
|
||||
"Content-Security-Policy": csp,
|
||||
"Cache-Control": cacheControl,
|
||||
},
|
||||
@@ -528,8 +528,8 @@ func TestFileSystemCopy(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Missing copied file %q: %v", dst, err)
|
||||
}
|
||||
if f.Size() != 73 {
|
||||
t.Fatalf("Expected file size %d, got %d", 73, f.Size())
|
||||
if f.Size() != 77 {
|
||||
t.Fatalf("Expected file size %d, got %d", 77, f.Size())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -618,7 +618,7 @@ func TestFileSystemServeSingleRange(t *testing.T) {
|
||||
t.Fatalf("Expected StatusCode %d, got %d", http.StatusPartialContent, result.StatusCode)
|
||||
}
|
||||
|
||||
expectedRange := "bytes 0-20/73"
|
||||
expectedRange := "bytes 0-20/77"
|
||||
if cr := result.Header.Get("Content-Range"); cr != expectedRange {
|
||||
t.Fatalf("Expected Content-Range %q, got %q", expectedRange, cr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user