aboutsummaryrefslogtreecommitdiffstats
path: root/storage/filesystem/dotgit/repository_filesystem_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'storage/filesystem/dotgit/repository_filesystem_test.go')
-rw-r--r--storage/filesystem/dotgit/repository_filesystem_test.go15
1 files changed, 3 insertions, 12 deletions
diff --git a/storage/filesystem/dotgit/repository_filesystem_test.go b/storage/filesystem/dotgit/repository_filesystem_test.go
index 880ec0d..022bde7 100644
--- a/storage/filesystem/dotgit/repository_filesystem_test.go
+++ b/storage/filesystem/dotgit/repository_filesystem_test.go
@@ -1,25 +1,16 @@
package dotgit
import (
- "io/ioutil"
- "log"
"os"
- "github.com/go-git/go-billy/v5/osfs"
-
. "gopkg.in/check.v1"
)
func (s *SuiteDotGit) TestRepositoryFilesystem(c *C) {
- dir, err := ioutil.TempDir("", "repository_filesystem")
- if err != nil {
- log.Fatal(err)
- }
- defer os.RemoveAll(dir)
-
- fs := osfs.New(dir)
+ fs, clean := s.TemporalFilesystem()
+ defer clean()
- err = fs.MkdirAll("dotGit", 0777)
+ err := fs.MkdirAll("dotGit", 0777)
c.Assert(err, IsNil)
dotGitFs, err := fs.Chroot("dotGit")
c.Assert(err, IsNil)