|
|
@ -560,6 +560,22 @@ func (s *MyAPISignatureV4Suite) TestListObjectsHandlerErrors(c *C) { |
|
|
|
response, err = client.Do(request) |
|
|
|
response, err = client.Do(request) |
|
|
|
c.Assert(err, IsNil) |
|
|
|
c.Assert(err, IsNil) |
|
|
|
verifyError(c, response, "NoSuchBucket", "The specified bucket does not exist.", http.StatusNotFound) |
|
|
|
verifyError(c, response, "NoSuchBucket", "The specified bucket does not exist.", http.StatusNotFound) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
request, err = s.newRequest("PUT", testSignatureV4Server.URL+"/objecthandlererrors", 0, nil) |
|
|
|
|
|
|
|
c.Assert(err, IsNil) |
|
|
|
|
|
|
|
request.Header.Add("x-amz-acl", "private") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
client = http.Client{} |
|
|
|
|
|
|
|
response, err = client.Do(request) |
|
|
|
|
|
|
|
c.Assert(err, IsNil) |
|
|
|
|
|
|
|
c.Assert(response.StatusCode, Equals, http.StatusOK) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
request, err = http.NewRequest("GET", testSignatureV4Server.URL+"/objecthandlererrors?max-keys=-2", nil) |
|
|
|
|
|
|
|
c.Assert(err, IsNil) |
|
|
|
|
|
|
|
client = http.Client{} |
|
|
|
|
|
|
|
response, err = client.Do(request) |
|
|
|
|
|
|
|
c.Assert(err, IsNil) |
|
|
|
|
|
|
|
verifyError(c, response, "InvalidArgument", "Argument maxKeys must be an integer between 0 and 2147483647", http.StatusBadRequest) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (s *MyAPISignatureV4Suite) TestPutBucketErrors(c *C) { |
|
|
|
func (s *MyAPISignatureV4Suite) TestPutBucketErrors(c *C) { |
|
|
@ -806,6 +822,12 @@ func (s *MyAPISignatureV4Suite) TestObjectMultipartList(c *C) { |
|
|
|
c.Assert(err, IsNil) |
|
|
|
c.Assert(err, IsNil) |
|
|
|
c.Assert(response3.StatusCode, Equals, http.StatusOK) |
|
|
|
c.Assert(response3.StatusCode, Equals, http.StatusOK) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
request, err = http.NewRequest("GET", testSignatureV4Server.URL+"/objectmultipartlist/object?max-parts=-2&uploadId="+uploadID, nil) |
|
|
|
|
|
|
|
c.Assert(err, IsNil) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
response4, err := client.Do(request) |
|
|
|
|
|
|
|
c.Assert(err, IsNil) |
|
|
|
|
|
|
|
verifyError(c, response4, "InvalidArgument", "Argument maxParts must be an integer between 1 and 10000", http.StatusBadRequest) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (s *MyAPISignatureV4Suite) TestObjectMultipart(c *C) { |
|
|
|
func (s *MyAPISignatureV4Suite) TestObjectMultipart(c *C) { |
|
|
|