mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Add leak detection to object-handler tests. (#3195)
This commit is contained in:
parent
efca29b00e
commit
286a8924fd
@ -48,6 +48,7 @@ const (
|
|||||||
|
|
||||||
// Wrapper for calling GetObject API handler tests for both XL multiple disks and FS single drive setup.
|
// Wrapper for calling GetObject API handler tests for both XL multiple disks and FS single drive setup.
|
||||||
func TestAPIGetObjectHandler(t *testing.T) {
|
func TestAPIGetObjectHandler(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPIGetObjectHandler, []string{"GetObject"})
|
ExecObjectLayerAPITest(t, testAPIGetObjectHandler, []string{"GetObject"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,6 +270,7 @@ func testAPIGetObjectHandler(obj ObjectLayer, instanceType, bucketName string, a
|
|||||||
|
|
||||||
// Wrapper for calling PutObject API handler tests using streaming signature v4 for both XL multiple disks and FS single drive setup.
|
// Wrapper for calling PutObject API handler tests using streaming signature v4 for both XL multiple disks and FS single drive setup.
|
||||||
func TestAPIPutObjectStreamSigV4Handler(t *testing.T) {
|
func TestAPIPutObjectStreamSigV4Handler(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPIPutObjectStreamSigV4Handler, []string{"PutObject"})
|
ExecObjectLayerAPITest(t, testAPIPutObjectStreamSigV4Handler, []string{"PutObject"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,6 +538,7 @@ func testAPIPutObjectStreamSigV4Handler(obj ObjectLayer, instanceType, bucketNam
|
|||||||
|
|
||||||
// Wrapper for calling PutObject API handler tests for both XL multiple disks and FS single drive setup.
|
// Wrapper for calling PutObject API handler tests for both XL multiple disks and FS single drive setup.
|
||||||
func TestAPIPutObjectHandler(t *testing.T) {
|
func TestAPIPutObjectHandler(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPIPutObjectHandler, []string{"PutObject"})
|
ExecObjectLayerAPITest(t, testAPIPutObjectHandler, []string{"PutObject"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -772,6 +775,7 @@ func testAPIPutObjectHandler(obj ObjectLayer, instanceType, bucketName string, a
|
|||||||
|
|
||||||
// Wrapper for calling Copy Object API handler tests for both XL multiple disks and single node setup.
|
// Wrapper for calling Copy Object API handler tests for both XL multiple disks and single node setup.
|
||||||
func TestAPICopyObjectHandler(t *testing.T) {
|
func TestAPICopyObjectHandler(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPICopyObjectHandler, []string{"CopyObject"})
|
ExecObjectLayerAPITest(t, testAPICopyObjectHandler, []string{"CopyObject"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1015,6 +1019,7 @@ func testAPICopyObjectHandler(obj ObjectLayer, instanceType, bucketName string,
|
|||||||
// First register the HTTP handler for NewMutlipartUpload, then a HTTP request for NewMultipart upload is made.
|
// First register the HTTP handler for NewMutlipartUpload, then a HTTP request for NewMultipart upload is made.
|
||||||
// The UploadID from the response body is parsed and its existence is asserted with an attempt to ListParts using it.
|
// The UploadID from the response body is parsed and its existence is asserted with an attempt to ListParts using it.
|
||||||
func TestAPINewMultipartHandler(t *testing.T) {
|
func TestAPINewMultipartHandler(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPINewMultipartHandler, []string{"NewMultipart"})
|
ExecObjectLayerAPITest(t, testAPINewMultipartHandler, []string{"NewMultipart"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1160,6 +1165,7 @@ func testAPINewMultipartHandler(obj ObjectLayer, instanceType, bucketName string
|
|||||||
// The objective of the test is to initialte multipart upload on the same object 10 times concurrently,
|
// The objective of the test is to initialte multipart upload on the same object 10 times concurrently,
|
||||||
// The UploadID from the response body is parsed and its existence is asserted with an attempt to ListParts using it.
|
// The UploadID from the response body is parsed and its existence is asserted with an attempt to ListParts using it.
|
||||||
func TestAPINewMultipartHandlerParallel(t *testing.T) {
|
func TestAPINewMultipartHandlerParallel(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPINewMultipartHandlerParallel, []string{"NewMultipart"})
|
ExecObjectLayerAPITest(t, testAPINewMultipartHandlerParallel, []string{"NewMultipart"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1219,6 +1225,7 @@ func testAPINewMultipartHandlerParallel(obj ObjectLayer, instanceType, bucketNam
|
|||||||
|
|
||||||
// The UploadID from the response body is parsed and its existence is asserted with an attempt to ListParts using it.
|
// The UploadID from the response body is parsed and its existence is asserted with an attempt to ListParts using it.
|
||||||
func TestAPICompleteMultipartHandler(t *testing.T) {
|
func TestAPICompleteMultipartHandler(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPICompleteMultipartHandler, []string{"CompleteMultipart"})
|
ExecObjectLayerAPITest(t, testAPICompleteMultipartHandler, []string{"CompleteMultipart"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1580,6 +1587,7 @@ func testAPICompleteMultipartHandler(obj ObjectLayer, instanceType, bucketName s
|
|||||||
|
|
||||||
// Wrapper for calling Delete Object API handler tests for both XL multiple disks and FS single drive setup.
|
// Wrapper for calling Delete Object API handler tests for both XL multiple disks and FS single drive setup.
|
||||||
func TestAPIDeleteObjectHandler(t *testing.T) {
|
func TestAPIDeleteObjectHandler(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPIDeleteObjectHandler, []string{"DeleteObject"})
|
ExecObjectLayerAPITest(t, testAPIDeleteObjectHandler, []string{"DeleteObject"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1746,6 +1754,7 @@ func testAPIDeleteObjectHandler(obj ObjectLayer, instanceType, bucketName string
|
|||||||
// TestAPIPutObjectPartHandlerPreSign - Tests validate the response of PutObjectPart HTTP handler
|
// TestAPIPutObjectPartHandlerPreSign - Tests validate the response of PutObjectPart HTTP handler
|
||||||
// when the request signature type is PreSign.
|
// when the request signature type is PreSign.
|
||||||
func TestAPIPutObjectPartHandlerPreSign(t *testing.T) {
|
func TestAPIPutObjectPartHandlerPreSign(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPIPutObjectPartHandlerPreSign, []string{"NewMultipart", "PutObjectPart"})
|
ExecObjectLayerAPITest(t, testAPIPutObjectPartHandlerPreSign, []string{"NewMultipart", "PutObjectPart"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1794,6 +1803,7 @@ func testAPIPutObjectPartHandlerPreSign(obj ObjectLayer, instanceType, bucketNam
|
|||||||
// TestAPIPutObjectPartHandlerStreaming - Tests validate the response of PutObjectPart HTTP handler
|
// TestAPIPutObjectPartHandlerStreaming - Tests validate the response of PutObjectPart HTTP handler
|
||||||
// when the request signature type is `streaming signature`.
|
// when the request signature type is `streaming signature`.
|
||||||
func TestAPIPutObjectPartHandlerStreaming(t *testing.T) {
|
func TestAPIPutObjectPartHandlerStreaming(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPIPutObjectPartHandlerStreaming, []string{"NewMultipart", "PutObjectPart"})
|
ExecObjectLayerAPITest(t, testAPIPutObjectPartHandlerStreaming, []string{"NewMultipart", "PutObjectPart"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1881,6 +1891,7 @@ func testAPIPutObjectPartHandlerStreaming(obj ObjectLayer, instanceType, bucketN
|
|||||||
// TestAPIPutObjectPartHandler - Tests validate the response of PutObjectPart HTTP handler
|
// TestAPIPutObjectPartHandler - Tests validate the response of PutObjectPart HTTP handler
|
||||||
// for variety of inputs.
|
// for variety of inputs.
|
||||||
func TestAPIPutObjectPartHandler(t *testing.T) {
|
func TestAPIPutObjectPartHandler(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPIPutObjectPartHandler, []string{"PutObjectPart"})
|
ExecObjectLayerAPITest(t, testAPIPutObjectPartHandler, []string{"PutObjectPart"})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2196,6 +2207,7 @@ func testAPIPutObjectPartHandler(obj ObjectLayer, instanceType, bucketName strin
|
|||||||
// TestAPIListObjectPartsHandlerPreSign - Tests validate the response of ListObjectParts HTTP handler
|
// TestAPIListObjectPartsHandlerPreSign - Tests validate the response of ListObjectParts HTTP handler
|
||||||
// when signature type of the HTTP request is `Presigned`.
|
// when signature type of the HTTP request is `Presigned`.
|
||||||
func TestAPIListObjectPartsHandlerPreSign(t *testing.T) {
|
func TestAPIListObjectPartsHandlerPreSign(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPIListObjectPartsHandlerPreSign,
|
ExecObjectLayerAPITest(t, testAPIListObjectPartsHandlerPreSign,
|
||||||
[]string{"PutObjectPart", "NewMultipart", "ListObjectParts"})
|
[]string{"PutObjectPart", "NewMultipart", "ListObjectParts"})
|
||||||
}
|
}
|
||||||
@ -2263,6 +2275,7 @@ func testAPIListObjectPartsHandlerPreSign(obj ObjectLayer, instanceType, bucketN
|
|||||||
// TestAPIListObjectPartsHandler - Tests validate the response of ListObjectParts HTTP handler
|
// TestAPIListObjectPartsHandler - Tests validate the response of ListObjectParts HTTP handler
|
||||||
// for variety of success/failure cases.
|
// for variety of success/failure cases.
|
||||||
func TestAPIListObjectPartsHandler(t *testing.T) {
|
func TestAPIListObjectPartsHandler(t *testing.T) {
|
||||||
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(t, testAPIListObjectPartsHandler, []string{"ListObjectParts"})
|
ExecObjectLayerAPITest(t, testAPIListObjectPartsHandler, []string{"ListObjectParts"})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user