xl: Enable a subset of tests for XL branch. (#1359)

This commit is contained in:
Harshavardhana
2016-04-22 16:19:45 -07:00
committed by Harshavardhana
parent 8c85815106
commit cab6805f09
4 changed files with 58 additions and 18 deletions

View File

@@ -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)