Merge pull request #55 from harshavardhana/pr_out_putbucket_before_putobject_in_testputobject

master
Harshavardhana 10 years ago
commit be9690f3e9
  1. 10
      pkg/webapi/minioapi/minioapi_test.go

@ -231,7 +231,8 @@ func (s *MySuite) TestPutObject(c *C) {
date1 := time.Now() date1 := time.Now()
request, err := http.NewRequest("PUT", testServer.URL+"/bucket/two", bytes.NewBufferString("hello world")) // Put Bucket before - Put Object into a bucket
request, err := http.NewRequest("PUT", testServer.URL+"/bucket/", bytes.NewBufferString(""))
c.Assert(err, IsNil) c.Assert(err, IsNil)
client := http.Client{} client := http.Client{}
@ -239,6 +240,13 @@ func (s *MySuite) TestPutObject(c *C) {
c.Assert(err, IsNil) c.Assert(err, IsNil)
c.Assert(response.StatusCode, Equals, http.StatusOK) c.Assert(response.StatusCode, Equals, http.StatusOK)
request, err = http.NewRequest("PUT", testServer.URL+"/bucket/two", bytes.NewBufferString("hello world"))
c.Assert(err, IsNil)
response, err = client.Do(request)
c.Assert(err, IsNil)
c.Assert(response.StatusCode, Equals, http.StatusOK)
date2 := time.Now() date2 := time.Now()
objects = storage.ListObjects("bucket", "", 1000) objects = storage.ListObjects("bucket", "", 1000)

Loading…
Cancel
Save