From fa26e2b6c32c6e1b401654a635eb9b5c83bee5e5 Mon Sep 17 00:00:00 2001 From: Callum Styan Date: Wed, 6 Dec 2017 16:30:24 -0800 Subject: [PATCH] use test utils in compact_test --- compact_test.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/compact_test.go b/compact_test.go index a8ae48fce..f874fdaaf 100644 --- a/compact_test.go +++ b/compact_test.go @@ -21,7 +21,6 @@ import ( "github.com/go-kit/kit/log" "github.com/pkg/errors" - "github.com/stretchr/testify/require" ) func TestSplitByRange(t *testing.T) { @@ -123,7 +122,7 @@ func TestSplitByRange(t *testing.T) { } } - require.Equal(t, exp, splitByRange(blocks, c.trange)) + Equals(t, exp, splitByRange(blocks, c.trange)) } } @@ -147,7 +146,7 @@ func TestNoPanicFor0Tombstones(t *testing.T) { } c, err := NewLeveledCompactor(nil, nil, []int64{50}, nil) - require.NoError(t, err) + Ok(t, err) c.plan(metas) } @@ -160,7 +159,7 @@ func TestLeveledCompactor_plan(t *testing.T) { 720, 2160, }, nil) - require.NoError(t, err) + Ok(t, err) cases := []struct { metas []dirMeta @@ -261,11 +260,11 @@ func TestLeveledCompactor_plan(t *testing.T) { }, } - for i, c := range cases { + for _, c := range cases { res, err := compactor.plan(c.metas) - require.NoError(t, err) + Ok(t, err) - require.Equal(t, c.expected, res, "test case %d", i) + Equals(t, c.expected, res) } }