Return http.StatusNotImplemented for range of Bucket and Object resources

Not Implemented bucket resources
================================
    "acl":            true
    "lifecycle":      true
    "policy":         true
    "location":       true
    "logging":        true
    "notification":   true
    "versions":       true
    "requestPayment": true
    "versioning":     true
    "website":        true
    "uploads":        true

Not Implemented object resources
================================
    "uploadId":       true
    "acl":            true
    "torrent":        true
    "uploads":        true
This commit is contained in:
Harshavardhana
2015-01-24 16:35:33 -08:00
parent be9690f3e9
commit c751811dcb
3 changed files with 77 additions and 0 deletions

View File

@@ -174,6 +174,17 @@ func (s *MySuite) TestMultipleObjects(c *C) {
c.Assert(true, Equals, bytes.Equal(responseBody, []byte("hello three")))
}
func (s *MySuite) TestNotImplemented(c *C) {
_, _, storage := inmemory.Start()
httpHandler := HttpHandler(storage)
testServer := httptest.NewServer(httpHandler)
defer testServer.Close()
response, err := http.Get(testServer.URL + "/bucket/object?acl")
c.Assert(err, IsNil)
c.Assert(response.StatusCode, Equals, http.StatusNotImplemented)
}
func (s *MySuite) TestHeader(c *C) {
_, _, storage := inmemory.Start()
httpHandler := HttpHandler(storage)