From 361bff216a3e5ec0e49d045c7684a7a867b2fc6f Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Mon, 12 Jul 2021 17:22:39 +0300 Subject: [PATCH] [#688] pkg/ir/governance: Check err type in tests Signed-off-by: Pavel Karpy --- pkg/innerring/processors/governance/list_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/innerring/processors/governance/list_test.go b/pkg/innerring/processors/governance/list_test.go index 2b67e0bed8..06c3c84fa8 100644 --- a/pkg/innerring/processors/governance/list_test.go +++ b/pkg/innerring/processors/governance/list_test.go @@ -16,7 +16,7 @@ func TestNewAlphabetList(t *testing.T) { t.Run("no sidechain keys", func(t *testing.T) { _, err := newAlphabetList(nil, orig) - require.Error(t, err) + require.ErrorIs(t, err, errEmptySidechain) }) t.Run("same keys", func(t *testing.T) { @@ -27,7 +27,7 @@ func TestNewAlphabetList(t *testing.T) { t.Run("not enough mainnet keys", func(t *testing.T) { _, err := newAlphabetList(orig, orig[:len(orig)-1]) - require.Error(t, err) + require.ErrorIs(t, err, errNotEnoughKeys) }) t.Run("less than third new keys", func(t *testing.T) { @@ -91,7 +91,7 @@ func TestUpdateInnerRing(t *testing.T) { after := k[4:5] _, err = updateInnerRing(ir, before, after) - require.Error(t, err) + require.ErrorIs(t, err, errNotEqualLen) }) t.Run("new list", func(t *testing.T) {