aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format/packfile/parser_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2020-03-10 01:41:19 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2020-03-10 01:41:19 +0100
commit2637279338ca9736c22b5e15fca916121ae8d089 (patch)
tree2273e55f2d2b68b9b6335924d6b00ddf3417e8e7 /plumbing/format/packfile/parser_test.go
parent2bdfd91f04068220a72feeade31defc09f2a601e (diff)
downloadgo-git-2637279338ca9736c22b5e15fca916121ae8d089.tar.gz
*: migration from go-git-fixtures/v4 and go-git/gcfg
Diffstat (limited to 'plumbing/format/packfile/parser_test.go')
-rw-r--r--plumbing/format/packfile/parser_test.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/plumbing/format/packfile/parser_test.go b/plumbing/format/packfile/parser_test.go
index 9d97cef..fb5fb7f 100644
--- a/plumbing/format/packfile/parser_test.go
+++ b/plumbing/format/packfile/parser_test.go
@@ -9,8 +9,8 @@ import (
"github.com/go-git/go-git/v5/plumbing/format/packfile"
"github.com/go-git/go-git/v5/plumbing/storer"
+ fixtures "github.com/go-git/go-git-fixtures/v4"
. "gopkg.in/check.v1"
- "gopkg.in/src-d/go-git-fixtures.v3"
)
type ParserSuite struct {
@@ -106,7 +106,7 @@ func (s *ParserSuite) TestThinPack(c *C) {
w.Close()
// Check that the test object that will come with our thin pack is *not* in the repo
- _, err = fs.Storer.EncodedObject(plumbing.CommitObject, thinpack.Head)
+ _, err = fs.Storer.EncodedObject(plumbing.CommitObject, plumbing.NewHash(thinpack.Head))
c.Assert(err, Equals, plumbing.ErrObjectNotFound)
// Now unpack the thin pack:
@@ -119,7 +119,7 @@ func (s *ParserSuite) TestThinPack(c *C) {
c.Assert(h, Equals, plumbing.NewHash("1288734cbe0b95892e663221d94b95de1f5d7be8"))
// Check that our test object is now accessible
- _, err = fs.Storer.EncodedObject(plumbing.CommitObject, thinpack.Head)
+ _, err = fs.Storer.EncodedObject(plumbing.CommitObject, plumbing.NewHash(thinpack.Head))
c.Assert(err, IsNil)
}
@@ -192,10 +192,6 @@ func (t *testObserver) put(pos int64, o observerObject) {
}
func BenchmarkParse(b *testing.B) {
- if err := fixtures.Init(); err != nil {
- b.Fatal(err)
- }
-
defer func() {
if err := fixtures.Clean(); err != nil {
b.Fatal(err)
@@ -220,10 +216,6 @@ func BenchmarkParse(b *testing.B) {
}
func BenchmarkParseBasic(b *testing.B) {
- if err := fixtures.Init(); err != nil {
- b.Fatal(err)
- }
-
defer func() {
if err := fixtures.Clean(); err != nil {
b.Fatal(err)