Add unit-tests for ListObjectParts API handler (#2826)

* Add missing uploadID test
... make variables in test code unexported.
* Add ServerNotInitialized test for ListObjectPartsHandler
* Add tests for ListObjectParts with signatureV2 and Anonymous requests
* Add failure test cases for ListObjectParts
This commit is contained in:
Krishnan Parthasarathi
2016-10-03 21:24:57 +05:30
committed by Harshavardhana
parent 61a18ed48f
commit 4f902d42b2
4 changed files with 339 additions and 24 deletions

View File

@@ -2305,7 +2305,7 @@ func (s *TestSuiteCommon) TestObjectMultipartListError(c *C) {
// HTTP request to ListMultipart Uploads.
// max-keys is set to valid value of 1
request, err = newTestSignedRequestV4("GET", getListMultipartURLWithParams(s.endPoint, bucketName, objectName, uploadID, "1"),
request, err = newTestSignedRequestV4("GET", getListMultipartURLWithParams(s.endPoint, bucketName, objectName, uploadID, "1", "", ""),
0, nil, s.accessKey, s.secretKey)
c.Assert(err, IsNil)
// execute the HTTP request.
@@ -2315,7 +2315,7 @@ func (s *TestSuiteCommon) TestObjectMultipartListError(c *C) {
// HTTP request to ListMultipart Uploads.
// max-keys is set to invalid value of -2.
request, err = newTestSignedRequestV4("GET", getListMultipartURLWithParams(s.endPoint, bucketName, objectName, uploadID, "-2"),
request, err = newTestSignedRequestV4("GET", getListMultipartURLWithParams(s.endPoint, bucketName, objectName, uploadID, "-2", "", ""),
0, nil, s.accessKey, s.secretKey)
c.Assert(err, IsNil)
// execute the HTTP request.