mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
tests: Do not allow forced type asserts (#20905)
This commit is contained in:
@@ -127,7 +127,6 @@ func LookupConfig(kvs config.KVS, transport http.RoundTripper) (cfg Config, err
|
||||
if err != nil {
|
||||
return cfg, err
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
cfg.License = strings.TrimSpace(env.Get(config.EnvMinIOSubnetLicense, kvs.Get(config.License)))
|
||||
@@ -142,9 +141,11 @@ func LookupConfig(kvs config.KVS, transport http.RoundTripper) (cfg Config, err
|
||||
|
||||
// Make sure to clone the transport before editing the ProxyURL
|
||||
if proxyURL != nil {
|
||||
ctransport := transport.(*http.Transport).Clone()
|
||||
ctransport.Proxy = http.ProxyURL((*url.URL)(proxyURL))
|
||||
cfg.transport = ctransport
|
||||
if tr, ok := transport.(*http.Transport); ok {
|
||||
ctransport := tr.Clone()
|
||||
ctransport.Proxy = http.ProxyURL((*url.URL)(proxyURL))
|
||||
cfg.transport = ctransport
|
||||
}
|
||||
} else {
|
||||
cfg.transport = transport
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user