aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
authorFilip Navara <filip.navara@gmail.com>2019-05-07 12:31:24 +0200
committerFilip Navara <filip.navara@gmail.com>2019-05-07 12:31:24 +0200
commitd2596b8d7fe07aecf83b5377c527f5d8999f7d16 (patch)
treeed4fe508e6d78a459af7e74421769a6a9954e446 /plumbing
parent0073a49b9575c2e64676485ca5126641510c6db5 (diff)
downloadgo-git-d2596b8d7fe07aecf83b5377c527f5d8999f7d16.tar.gz
Remove unnecessary mmap usage from tests
Signed-off-by: Filip Navara <filip.navara@gmail.com>
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/format/commitgraph/commitgraph_test.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/plumbing/format/commitgraph/commitgraph_test.go b/plumbing/format/commitgraph/commitgraph_test.go
index 0e38707..0214f49 100644
--- a/plumbing/format/commitgraph/commitgraph_test.go
+++ b/plumbing/format/commitgraph/commitgraph_test.go
@@ -6,10 +6,8 @@ import (
"path"
"testing"
- "golang.org/x/exp/mmap"
-
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
+ fixtures "gopkg.in/src-d/go-git-fixtures.v3"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/format/commitgraph"
)
@@ -23,7 +21,7 @@ type CommitgraphSuite struct {
var _ = Suite(&CommitgraphSuite{})
func testDecodeHelper(c *C, path string) {
- reader, err := mmap.Open(path)
+ reader, err := os.Open(path)
c.Assert(err, IsNil)
defer reader.Close()
index, err := commitgraph.OpenFileIndex(reader)
@@ -85,7 +83,7 @@ func (s *CommitgraphSuite) TestReencode(c *C) {
fixtures.ByTag("commit-graph").Test(c, func(f *fixtures.Fixture) {
dotgit := f.DotGit()
- reader, err := mmap.Open(path.Join(dotgit.Root(), "objects", "info", "commit-graph"))
+ reader, err := os.Open(path.Join(dotgit.Root(), "objects", "info", "commit-graph"))
c.Assert(err, IsNil)
defer reader.Close()
index, err := commitgraph.OpenFileIndex(reader)
@@ -108,7 +106,7 @@ func (s *CommitgraphSuite) TestReencodeInMemory(c *C) {
fixtures.ByTag("commit-graph").Test(c, func(f *fixtures.Fixture) {
dotgit := f.DotGit()
- reader, err := mmap.Open(path.Join(dotgit.Root(), "objects", "info", "commit-graph"))
+ reader, err := os.Open(path.Join(dotgit.Root(), "objects", "info", "commit-graph"))
c.Assert(err, IsNil)
index, err := commitgraph.OpenFileIndex(reader)
c.Assert(err, IsNil)