|
|
|
@ -30,7 +30,7 @@ import ( |
|
|
|
|
|
|
|
|
|
"github.com/minio-io/minio/pkg/api/minioapi" |
|
|
|
|
mstorage "github.com/minio-io/minio/pkg/storage" |
|
|
|
|
"github.com/minio-io/minio/pkg/storage/inmemory" |
|
|
|
|
"github.com/minio-io/minio/pkg/storage/memory" |
|
|
|
|
|
|
|
|
|
. "gopkg.in/check.v1" |
|
|
|
|
) |
|
|
|
@ -42,7 +42,7 @@ type MySuite struct{} |
|
|
|
|
var _ = Suite(&MySuite{}) |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestNonExistantObject(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -54,7 +54,7 @@ func (s *MySuite) TestNonExistantObject(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestEmptyObject(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -79,7 +79,7 @@ func (s *MySuite) TestEmptyObject(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestObject(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -102,7 +102,7 @@ func (s *MySuite) TestObject(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestMultipleObjects(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -182,7 +182,7 @@ func (s *MySuite) TestMultipleObjects(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestNotImplemented(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -193,7 +193,7 @@ func (s *MySuite) TestNotImplemented(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestHeader(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -216,7 +216,7 @@ func (s *MySuite) TestHeader(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestPutBucket(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -241,7 +241,7 @@ func (s *MySuite) TestPutBucket(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestPutObject(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -298,7 +298,7 @@ func (s *MySuite) TestPutObject(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestListBuckets(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -378,7 +378,7 @@ func verifyHeaders(c *C, header http.Header, date time.Time, size int, contentTy |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestXMLNameNotInBucketListJson(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -403,7 +403,7 @@ func (s *MySuite) TestXMLNameNotInBucketListJson(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestXMLNameNotInObjectListJson(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
@ -428,7 +428,7 @@ func (s *MySuite) TestXMLNameNotInObjectListJson(c *C) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (s *MySuite) TestContentTypePersists(c *C) { |
|
|
|
|
_, _, storage := inmemory.Start() |
|
|
|
|
_, _, storage := memory.Start() |
|
|
|
|
httpHandler := minioapi.HTTPHandler("", storage) |
|
|
|
|
testServer := httptest.NewServer(httpHandler) |
|
|
|
|
defer testServer.Close() |
|
|
|
|