mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 12:40:24 +03:00
move to go1.24 (#21114)
This commit is contained in:
@@ -19,7 +19,6 @@ package cmd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
@@ -108,7 +107,7 @@ func TestCheckPreconditions(t *testing.T) {
|
||||
request.Header.Set(xhttp.IfModifiedSince, tc.ifModifiedSince)
|
||||
request.Header.Set(xhttp.IfMatch, tc.ifMatch)
|
||||
request.Header.Set(xhttp.IfUnmodifiedSince, tc.ifUnmodifiedSince)
|
||||
actualFlag := checkPreconditions(context.Background(), recorder, request, tc.objInfo, ObjectOptions{})
|
||||
actualFlag := checkPreconditions(t.Context(), recorder, request, tc.objInfo, ObjectOptions{})
|
||||
if tc.expectedFlag != actualFlag {
|
||||
t.Errorf("test: %s, got flag: %v, want: %v", tc.name, actualFlag, tc.expectedFlag)
|
||||
}
|
||||
@@ -170,7 +169,7 @@ func TestCheckPreconditions(t *testing.T) {
|
||||
request.Header.Set(xhttp.IfModifiedSince, tc.ifModifiedSince)
|
||||
request.Header.Set(xhttp.IfMatch, tc.ifMatch)
|
||||
request.Header.Set(xhttp.IfUnmodifiedSince, tc.ifUnmodifiedSince)
|
||||
actualFlag := checkPreconditions(context.Background(), recorder, request, tc.objInfo, ObjectOptions{})
|
||||
actualFlag := checkPreconditions(t.Context(), recorder, request, tc.objInfo, ObjectOptions{})
|
||||
if tc.expectedFlag != actualFlag {
|
||||
t.Errorf("test: %s, got flag: %v, want: %v", tc.name, actualFlag, tc.expectedFlag)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user