mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 05:00:22 +03:00
move to go1.24 (#21114)
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path"
|
||||
"syscall"
|
||||
@@ -55,7 +54,7 @@ func TestIsValidUmaskVol(t *testing.T) {
|
||||
|
||||
// Attempt to create a volume to verify the permissions later.
|
||||
// MakeVol creates 0777.
|
||||
if err = disk.MakeVol(context.Background(), testCase.volName); err != nil {
|
||||
if err = disk.MakeVol(t.Context(), testCase.volName); err != nil {
|
||||
t.Fatalf("Creating a volume failed with %s expected to pass.", err)
|
||||
}
|
||||
|
||||
@@ -93,18 +92,18 @@ func TestIsValidUmaskFile(t *testing.T) {
|
||||
|
||||
// Attempt to create a volume to verify the permissions later.
|
||||
// MakeVol creates directory with 0777 perms.
|
||||
if err = disk.MakeVol(context.Background(), testCase.volName); err != nil {
|
||||
if err = disk.MakeVol(t.Context(), testCase.volName); err != nil {
|
||||
t.Fatalf("Creating a volume failed with %s expected to pass.", err)
|
||||
}
|
||||
|
||||
// Attempt to create a file to verify the permissions later.
|
||||
// AppendFile creates file with 0666 perms.
|
||||
if err = disk.AppendFile(context.Background(), testCase.volName, pathJoin("hello-world.txt", xlStorageFormatFile), []byte("Hello World")); err != nil {
|
||||
if err = disk.AppendFile(t.Context(), testCase.volName, pathJoin("hello-world.txt", xlStorageFormatFile), []byte("Hello World")); err != nil {
|
||||
t.Fatalf("Create a file `test` failed with %s expected to pass.", err)
|
||||
}
|
||||
|
||||
// CheckFile - stat the file.
|
||||
if _, err := disk.StatInfoFile(context.Background(), testCase.volName, "hello-world.txt/"+xlStorageFormatFile, false); err != nil {
|
||||
if _, err := disk.StatInfoFile(t.Context(), testCase.volName, "hello-world.txt/"+xlStorageFormatFile, false); err != nil {
|
||||
t.Fatalf("Stat failed with %s expected to pass.", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user