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

master
Aditya Manthramurthy 5 years ago committed by Harshavardhana
parent 2ab0681c0c
commit eb18c82976
  1. 1
      cmd/generic-handlers.go
  2. 15
      cmd/server_test.go

@ -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,

@ -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.

Loading…
Cancel
Save