Skip uinimplemented tests and some cleanup

master
Harshavardhana 10 years ago
parent 6990a64d01
commit 3f95c55067
  1. 2
      mkdocs.yml
  2. 8
      pkg/donutbox/donutmem/donutmem.go
  3. 4
      pkg/donutbox/donutmem/donutmem_test.go
  4. 2
      pkg/storage/encoded/encoded_test.go

@ -1,4 +1,6 @@
site_name: Minio Documentation site_name: Minio Documentation
copyright: Minio, Inc.
include_search: true
pages: pages:
- ['index.md', Welcome to Minio] - ['index.md', Welcome to Minio]
- ['architecture.md', 'Minio', Architecture] - ['architecture.md', 'Minio', Architecture]

@ -41,8 +41,8 @@ func NewDonutMem() donutbox.DonutBox {
func (donutMem donutMem) ListBuckets() ([]string, error) { func (donutMem donutMem) ListBuckets() ([]string, error) {
donutMem.lock.RLock() donutMem.lock.RLock()
defer donutMem.lock.RUnlock() defer donutMem.lock.RUnlock()
buckets := make([]string, 0) var buckets []string
for k, _ := range donutMem.buckets { for k := range donutMem.buckets {
buckets = append(buckets, k) buckets = append(buckets, k)
} }
return buckets, nil return buckets, nil
@ -74,8 +74,8 @@ func (donutMem donutMem) ListObjectsInBucket(bucketKey, prefixKey string) ([]str
if curBucket, ok := donutMem.buckets[bucketKey]; ok { if curBucket, ok := donutMem.buckets[bucketKey]; ok {
curBucket.lock.RLock() curBucket.lock.RLock()
defer curBucket.lock.RUnlock() defer curBucket.lock.RUnlock()
objects := make([]string, 0) var objects []string
for objectKey, _ := range curBucket.objects { for objectKey := range curBucket.objects {
if strings.HasPrefix(objectKey, prefixKey) { if strings.HasPrefix(objectKey, prefixKey) {
objects = append(objects, objectKey) objects = append(objects, objectKey)
} }

@ -62,7 +62,7 @@ func (s *MySuite) TestBucketList(c *C) {
results, err := donut.ListBuckets() results, err := donut.ListBuckets()
c.Assert(len(results), Equals, 0) c.Assert(len(results), Equals, 0)
buckets := make([]string, 0) var buckets []string
for i := 0; i < 10; i++ { for i := 0; i < 10; i++ {
bucket := "foo" + strconv.Itoa(i) bucket := "foo" + strconv.Itoa(i)
buckets = append(buckets, bucket) buckets = append(buckets, bucket)
@ -83,7 +83,7 @@ func (s *MySuite) TestObjectList(c *C) {
results, err := donut.ListObjectsInBucket("foo", "") results, err := donut.ListObjectsInBucket("foo", "")
c.Assert(len(results), Equals, 0) c.Assert(len(results), Equals, 0)
objects := make([]string, 0) var objects []string
for i := 0; i < 10; i++ { for i := 0; i < 10; i++ {
object := "foo" + strconv.Itoa(i) object := "foo" + strconv.Itoa(i)
objects = append(objects, object) objects = append(objects, object)

@ -34,7 +34,7 @@ type MySuite struct{}
var _ = Suite(&MySuite{}) var _ = Suite(&MySuite{})
func (s *MySuite) TestAPISuite(c *C) { func (s *MySuite) TestAPISuite(c *C) {
//c.Skip("Not implemented yet.") c.Skip("Not implemented yet.")
var storageList []string var storageList []string
create := func() mstorage.Storage { create := func() mstorage.Storage {
path, err := ioutil.TempDir(os.TempDir(), "minio-fs-") path, err := ioutil.TempDir(os.TempDir(), "minio-fs-")

Loading…
Cancel
Save