blob: 7300de7bacc09b836f844d284b88960382d5419e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package filesystem
import (
"testing"
"srcd.works/go-git.v4/storage/test"
. "gopkg.in/check.v1"
"srcd.works/go-billy.v1/memfs"
"srcd.works/go-billy.v1/osfs"
)
func Test(t *testing.T) { TestingT(t) }
type StorageSuite struct {
test.BaseStorageSuite
}
var _ = Suite(&StorageSuite{})
func (s *StorageSuite) SetUpTest(c *C) {
storage, err := NewStorage(osfs.New(c.MkDir()))
c.Assert(err, IsNil)
s.BaseStorageSuite = test.NewBaseStorageSuite(storage)
}
func (s *StorageSuite) TestFilesystem(c *C) {
fs := memfs.New()
storage, err := NewStorage(fs)
c.Assert(err, IsNil)
c.Assert(storage.Filesystem(), Equals, fs)
}
|