mirror of https://github.com/minio/minio.git
Putbucket before PutObject in TestPutObject
This commit is contained in:
parent
77210fead3
commit
704d6d8b0a
|
@ -231,7 +231,8 @@ func (s *MySuite) TestPutObject(c *C) {
|
|||
|
||||
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)
|
||||
|
||||
client := http.Client{}
|
||||
|
@ -239,6 +240,13 @@ func (s *MySuite) TestPutObject(c *C) {
|
|||
c.Assert(err, IsNil)
|
||||
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()
|
||||
|
||||
objects = storage.ListObjects("bucket", "", 1000)
|
||||
|
|
Loading…
Reference in New Issue