mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
build: ineffassign fixes. (#3134)
This commit is contained in:
parent
dd6ecf1193
commit
3e8cb8c937
@ -497,6 +497,10 @@ func testAPIPutObjectStreamSigV4Handler(obj ObjectLayer, instanceType, bucketNam
|
|||||||
// Set decoded length to a large value out of int64 range to simulate parse failure.
|
// Set decoded length to a large value out of int64 range to simulate parse failure.
|
||||||
req.Header.Set("x-amz-decoded-content-length", "9999999999999999999999")
|
req.Header.Set("x-amz-decoded-content-length", "9999999999999999999999")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("Error injecting faults into the request: <ERROR> %v.", err)
|
||||||
|
}
|
||||||
// Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler.
|
// Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler.
|
||||||
// Call the ServeHTTP to execute the handler,`func (api objectAPIHandlers) GetObjectHandler` handles the request.
|
// Call the ServeHTTP to execute the handler,`func (api objectAPIHandlers) GetObjectHandler` handles the request.
|
||||||
apiRouter.ServeHTTP(rec, req)
|
apiRouter.ServeHTTP(rec, req)
|
||||||
@ -1835,6 +1839,9 @@ func testAPIPutObjectPartHandlerStreaming(obj ObjectLayer, instanceType, bucketN
|
|||||||
getPutObjectPartURL("", bucketName, testObject, mpartResp.UploadID, "1"),
|
getPutObjectPartURL("", bucketName, testObject, mpartResp.UploadID, "1"),
|
||||||
5, 1, bytes.NewReader([]byte("hello")), credentials.AccessKeyID, credentials.SecretAccessKey)
|
5, 1, bytes.NewReader([]byte("hello")), credentials.AccessKeyID, credentials.SecretAccessKey)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("Failed to create new streaming signed HTTP request: <ERROR> %v.", err)
|
||||||
|
}
|
||||||
switch test.fault {
|
switch test.fault {
|
||||||
case BadSignature:
|
case BadSignature:
|
||||||
// Reset date field in header to make streaming signature fail.
|
// Reset date field in header to make streaming signature fail.
|
||||||
|
@ -178,7 +178,7 @@ func TestCheckSufficientDisks(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestCheckEndpointsSyntax(t *testing.T) {
|
func TestCheckEndpointsSyntax(t *testing.T) {
|
||||||
testCases := []string{}
|
var testCases []string
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
testCases = []string{
|
testCases = []string{
|
||||||
"\\export",
|
"\\export",
|
||||||
|
@ -789,7 +789,7 @@ func newTestStreamingSignedBadChunkDateRequest(method, urlStr string, contentLen
|
|||||||
// skew the time between the chunk signature calculation and seed signature.
|
// skew the time between the chunk signature calculation and seed signature.
|
||||||
currTime = currTime.Add(1 * time.Second)
|
currTime = currTime.Add(1 * time.Second)
|
||||||
req, err = assembleStreamingChunks(req, body, chunkSize, secretKey, signature, currTime)
|
req, err = assembleStreamingChunks(req, body, chunkSize, secretKey, signature, currTime)
|
||||||
return req, nil
|
return req, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns new HTTP request object signed with streaming signature v4.
|
// Returns new HTTP request object signed with streaming signature v4.
|
||||||
@ -806,7 +806,7 @@ func newTestStreamingSignedRequest(method, urlStr string, contentLength, chunkSi
|
|||||||
}
|
}
|
||||||
|
|
||||||
req, err = assembleStreamingChunks(req, body, chunkSize, secretKey, signature, currTime)
|
req, err = assembleStreamingChunks(req, body, chunkSize, secretKey, signature, currTime)
|
||||||
return req, nil
|
return req, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replaces any occurring '/' in string, into its encoded
|
// Replaces any occurring '/' in string, into its encoded
|
||||||
|
2
dist/linux-systemd/distributed/README.md
vendored
2
dist/linux-systemd/distributed/README.md
vendored
@ -29,7 +29,7 @@
|
|||||||
MINIO_VOLUMES=node1:/tmp/drive1 node2:/drive1 node3:/tmp/drive1 minio4:/tmp/drive1
|
MINIO_VOLUMES=node1:/tmp/drive1 node2:/drive1 node3:/tmp/drive1 minio4:/tmp/drive1
|
||||||
# Use if you want to run Minio on a custom port.
|
# Use if you want to run Minio on a custom port.
|
||||||
MINIO_OPTS="--address :9199"
|
MINIO_OPTS="--address :9199"
|
||||||
# Acess Key of the server.
|
# Access Key of the server.
|
||||||
MINIO_ACCESS_KEY=Server-Access-Key
|
MINIO_ACCESS_KEY=Server-Access-Key
|
||||||
# Secret key of the server.
|
# Secret key of the server.
|
||||||
MINIO_SECRET_KEY=Server-Secret-Key
|
MINIO_SECRET_KEY=Server-Secret-Key
|
||||||
|
Loading…
Reference in New Issue
Block a user