mirror of
https://github.com/minio/minio.git
synced 2025-11-29 21:33:31 -05:00
xl: Enable a subset of tests for XL branch. (#1359)
This commit is contained in:
committed by
Harshavardhana
parent
8c85815106
commit
cab6805f09
@@ -27,7 +27,7 @@ type MySuite struct{}
|
||||
|
||||
var _ = Suite(&MySuite{})
|
||||
|
||||
func (s *MySuite) TestAPISuite(c *C) {
|
||||
func (s *MySuite) TestFSAPISuite(c *C) {
|
||||
var storageList []string
|
||||
create := func() objectAPI {
|
||||
path, err := ioutil.TempDir(os.TempDir(), "minio-")
|
||||
@@ -41,6 +41,26 @@ func (s *MySuite) TestAPISuite(c *C) {
|
||||
defer removeRoots(c, storageList)
|
||||
}
|
||||
|
||||
func (s *MySuite) TestXLAPISuite(c *C) {
|
||||
var storageList []string
|
||||
create := func() objectAPI {
|
||||
var nDisks = 16 // Maximum disks.
|
||||
var erasureDisks []string
|
||||
for i := 0; i < nDisks; i++ {
|
||||
path, err := ioutil.TempDir(os.TempDir(), "minio-")
|
||||
c.Check(err, IsNil)
|
||||
erasureDisks = append(erasureDisks, path)
|
||||
}
|
||||
storageList = append(storageList, erasureDisks...)
|
||||
storageAPI, err := newXL(erasureDisks...)
|
||||
c.Check(err, IsNil)
|
||||
objAPI := newObjectLayer(storageAPI)
|
||||
return objAPI
|
||||
}
|
||||
APITestSuite(c, create)
|
||||
defer removeRoots(c, storageList)
|
||||
}
|
||||
|
||||
func removeRoots(c *C, roots []string) {
|
||||
for _, root := range roots {
|
||||
os.RemoveAll(root)
|
||||
|
||||
Reference in New Issue
Block a user