Remove policy query param from being rejected for objects (#8144)

This commit is contained in:
Aditya Manthramurthy 2019-08-28 16:58:40 -07:00 committed by Harshavardhana
parent 2ab0681c0c
commit eb18c82976
2 changed files with 0 additions and 16 deletions

View File

@ -487,7 +487,6 @@ var notimplementedBucketResourceNames = map[string]bool{
// List of not implemented object queries
var notimplementedObjectResourceNames = map[string]bool{
"acl": true,
"policy": true,
"restore": true,
"tagging": true,
"torrent": true,

View File

@ -87,7 +87,6 @@ func runAllTests(suite *TestSuiteCommon, c *check) {
suite.TestObjectGetAnonymous(c)
suite.TestObjectGet(c)
suite.TestMultipleObjects(c)
suite.TestNotImplemented(c)
suite.TestHeader(c)
suite.TestPutBucket(c)
suite.TestCopyObject(c)
@ -996,20 +995,6 @@ func (s *TestSuiteCommon) TestMultipleObjects(c *check) {
c.Assert(true, bytes.Equal(responseBody, []byte("hello three")))
}
// TestNotImplemented - validates if object policy is implemented, should return 'NotImplemented'.
func (s *TestSuiteCommon) TestNotImplemented(c *check) {
// Generate a random bucket name.
bucketName := getRandomBucketName()
request, err := newTestSignedRequest("GET", s.endPoint+SlashSeparator+bucketName+"/object?policy",
0, nil, s.accessKey, s.secretKey, s.signer)
c.Assert(err, nil)
client := http.Client{Transport: s.transport}
response, err := client.Do(request)
c.Assert(err, nil)
c.Assert(response.StatusCode, http.StatusNotImplemented)
}
// TestHeader - Validates the error response for an attempt to fetch non-existent object.
func (s *TestSuiteCommon) TestHeader(c *check) {
// generate a random bucket name.