mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
use GlobalContext whenever possible (#9280)
This change is throughout the codebase to ensure that all codepaths honor GlobalContext
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
package oss
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"reflect"
|
||||
@@ -115,7 +114,7 @@ func TestS3MetaToOSSOptions(t *testing.T) {
|
||||
headers := map[string]string{
|
||||
"x-amz-meta-invalid_meta": "value",
|
||||
}
|
||||
_, err = appendS3MetaToOSSOptions(context.Background(), nil, headers)
|
||||
_, err = appendS3MetaToOSSOptions(minio.GlobalContext, nil, headers)
|
||||
if err != nil {
|
||||
if _, ok := err.(minio.UnsupportedMetadata); !ok {
|
||||
t.Fatalf("Test failed with unexpected error %s, expected UnsupportedMetadata", err)
|
||||
@@ -132,7 +131,7 @@ func TestS3MetaToOSSOptions(t *testing.T) {
|
||||
"X-Amz-Meta-X-Amz-Matdesc": "{}",
|
||||
"X-Amz-Meta-X-Amz-Iv": "eWmyryl8kq+EVnnsE7jpOg==",
|
||||
}
|
||||
opts, err := appendS3MetaToOSSOptions(context.Background(), nil, headers)
|
||||
opts, err := appendS3MetaToOSSOptions(minio.GlobalContext, nil, headers)
|
||||
if err != nil {
|
||||
t.Fatalf("Test failed, with %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user