Merge pull request #101 from fkautz/pr_out_fixing_build

Fixing build
This commit is contained in:
Harshavardhana 2014-12-10 19:00:34 -08:00
commit 9142de1dd5
3 changed files with 24 additions and 9 deletions

View File

@ -32,8 +32,16 @@ build-split: build-strbyteconv
build-strbyteconv: build-strbyteconv:
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/strbyteconv @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/strbyteconv
cover: build-erasure build-signify build-split build-crc32c build-cpu build-sha1 build-storage: build-storage-fs build-storage-append
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/storage @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/storage
build-storage-fs:
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/storage/fsstorage
build-storage-append:
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/storage/appendstorage
cover: build-erasure build-signify build-split build-crc32c build-cpu build-sha1 build-storage
@godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/gateway @godep go test -race -coverprofile=cover.out github.com/minio-io/minio/pkgs/gateway
install: build-erasure install: build-erasure

View File

@ -3,6 +3,7 @@ package appendstorage
import ( import (
"bytes" "bytes"
"encoding/gob" "encoding/gob"
"errors"
"io/ioutil" "io/ioutil"
"os" "os"
"path" "path"
@ -97,3 +98,7 @@ func (storage *appendStorage) Put(objectPath string, object []byte) error {
ioutil.WriteFile(storage.objectsFile, mapBuffer.Bytes(), 0600) ioutil.WriteFile(storage.objectsFile, mapBuffer.Bytes(), 0600)
return nil return nil
} }
func (storage *appendStorage) GetList() ([]byte, error) {
return nil, errors.New("Not Implemented")
}

View File

@ -1,26 +1,28 @@
package fsstorage package fsstorage
import ( import (
. "gopkg.in/check.v1"
"io/ioutil" "io/ioutil"
"os" "os"
"github.com/minio-io/minio/pkgs/storage"
. "gopkg.in/check.v1"
) )
type FileSystemStorageSuite struct{} type FileSystemStorageSuite struct{}
var _ = Suite(&FileStorageSuite{}) var _ = Suite(&FileSystemStorageSuite{})
func makeTempTestDir() (string, error) { func makeTempTestDir() (string, error) {
return ioutil.TempDir("/tmp", "minio-test-") return ioutil.TempDir("/tmp", "minio-test-")
} }
func (s *FileStorageSuite) TestFileStoragePutAtRootPath(c *C) { func (s *FileSystemStorageSuite) TestFileStoragePutAtRootPath(c *C) {
rootDir, err := makeTempTestDir() rootDir, err := makeTempTestDir()
c.Assert(err, IsNil) c.Assert(err, IsNil)
defer os.RemoveAll(rootDir) defer os.RemoveAll(rootDir)
var storage ObjectStorage var storage storage.ObjectStorage
storage = FileStorage{ storage = FileSystemStorage{
RootDir: rootDir, RootDir: rootDir,
} }
@ -32,13 +34,13 @@ func (s *FileStorageSuite) TestFileStoragePutAtRootPath(c *C) {
c.Assert(string(object1), Equals, "object1") c.Assert(string(object1), Equals, "object1")
} }
func (s *FileStorageSuite) TestFileStoragePutDirPath(c *C) { func (s *FileSystemStorageSuite) TestFileStoragePutDirPath(c *C) {
rootDir, err := makeTempTestDir() rootDir, err := makeTempTestDir()
c.Assert(err, IsNil) c.Assert(err, IsNil)
defer os.RemoveAll(rootDir) defer os.RemoveAll(rootDir)
var storage ObjectStorage var storage storage.ObjectStorage
storage = FileStorage{ storage = FileSystemStorage{
RootDir: rootDir, RootDir: rootDir,
} }