mirror of
https://github.com/minio/minio.git
synced 2025-03-31 01:33:41 -04:00
fix: remove initGlobalContext writes in tests (#9331)
since we do not close GlobalContext, we do not need to reinitialize it inside test code
This commit is contained in:
parent
a9d401ac10
commit
d079adc167
@ -96,30 +96,13 @@ const testConcurrencyLevel = 10
|
|||||||
/// (that are executed by other agents) or when customers pass requests through proxies, which may
|
/// (that are executed by other agents) or when customers pass requests through proxies, which may
|
||||||
/// modify the user-agent.
|
/// modify the user-agent.
|
||||||
///
|
///
|
||||||
/// Content-Length:
|
|
||||||
///
|
|
||||||
/// This is ignored from signing because generating a pre-signed URL should not provide a content-length
|
|
||||||
/// constraint, specifically when vending a S3 pre-signed PUT URL. The corollary to this is that when
|
|
||||||
/// sending regular requests (non-pre-signed), the signature contains a checksum of the body, which
|
|
||||||
/// implicitly validates the payload length (since changing the number of bytes would change the checksum)
|
|
||||||
/// and therefore this header is not valuable in the signature.
|
|
||||||
///
|
|
||||||
/// Content-Type:
|
|
||||||
///
|
|
||||||
/// Signing this header causes quite a number of problems in browser environments, where browsers
|
|
||||||
/// like to modify and normalize the content-type header in different ways. There is more information
|
|
||||||
/// on this in https://github.com/aws/aws-sdk-js/issues/244. Avoiding this field simplifies logic
|
|
||||||
/// and reduces the possibility of future bugs
|
|
||||||
///
|
|
||||||
/// Authorization:
|
/// Authorization:
|
||||||
///
|
///
|
||||||
/// Is skipped for obvious reasons
|
/// Is skipped for obvious reasons
|
||||||
///
|
///
|
||||||
var ignoredHeaders = map[string]bool{
|
var ignoredHeaders = map[string]bool{
|
||||||
"Authorization": true,
|
"Authorization": true,
|
||||||
"Content-Type": true,
|
"User-Agent": true,
|
||||||
"Content-Length": true,
|
|
||||||
"User-Agent": true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Headers to ignore in streaming v4
|
// Headers to ignore in streaming v4
|
||||||
@ -481,10 +464,6 @@ func resetGlobalIAMSys() {
|
|||||||
// Resets all the globals used modified in tests.
|
// Resets all the globals used modified in tests.
|
||||||
// Resetting ensures that the changes made to globals by one test doesn't affect others.
|
// Resetting ensures that the changes made to globals by one test doesn't affect others.
|
||||||
func resetTestGlobals() {
|
func resetTestGlobals() {
|
||||||
// close any indefinitely running go-routines from previous
|
|
||||||
// tests.
|
|
||||||
cancelGlobalContext()
|
|
||||||
initGlobalContext()
|
|
||||||
// set globalObjectAPI to `nil`.
|
// set globalObjectAPI to `nil`.
|
||||||
resetGlobalObjectAPI()
|
resetGlobalObjectAPI()
|
||||||
// Reset config path set.
|
// Reset config path set.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user