From 9d0f15c4fa712cdacfa3887e9baac918f093fbf6 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Sun, 15 Mar 2020 21:18:32 +0100 Subject: ci: based on github actions --- plumbing/format/idxfile/decoder_test.go | 6 +----- plumbing/format/packfile/parser_test.go | 12 ++---------- 2 files changed, 3 insertions(+), 15 deletions(-) (limited to 'plumbing') diff --git a/plumbing/format/idxfile/decoder_test.go b/plumbing/format/idxfile/decoder_test.go index 467e242..94059cc 100644 --- a/plumbing/format/idxfile/decoder_test.go +++ b/plumbing/format/idxfile/decoder_test.go @@ -124,11 +124,7 @@ func BenchmarkDecode(b *testing.B) { b.Errorf("unexpected error reading idx file: %s", err) } - defer func() { - if err := fixtures.Clean(); err != nil { - b.Errorf("unexpected error cleaning fixtures: %s", err) - } - }() + defer fixtures.Clean() for i := 0; i < b.N; i++ { f := bytes.NewBuffer(fixture) diff --git a/plumbing/format/packfile/parser_test.go b/plumbing/format/packfile/parser_test.go index fb5fb7f..57a9c17 100644 --- a/plumbing/format/packfile/parser_test.go +++ b/plumbing/format/packfile/parser_test.go @@ -192,11 +192,7 @@ func (t *testObserver) put(pos int64, o observerObject) { } func BenchmarkParse(b *testing.B) { - defer func() { - if err := fixtures.Clean(); err != nil { - b.Fatal(err) - } - }() + defer fixtures.Clean() for _, f := range fixtures.ByTag("packfile") { b.Run(f.URL, func(b *testing.B) { @@ -216,11 +212,7 @@ func BenchmarkParse(b *testing.B) { } func BenchmarkParseBasic(b *testing.B) { - defer func() { - if err := fixtures.Clean(); err != nil { - b.Fatal(err) - } - }() + defer fixtures.Clean() f := fixtures.Basic().One() for i := 0; i < b.N; i++ { -- cgit