From 910db4274880d9bc5800534a499512674f723d83 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 29 Apr 2022 13:23:42 +0300 Subject: [PATCH] [#1344] pilorama: Use `require.ErrorIs` in tests Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/pilorama/forest_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/local_object_storage/pilorama/forest_test.go b/pkg/local_object_storage/pilorama/forest_test.go index d3503bf3b1..c2b12a585e 100644 --- a/pkg/local_object_storage/pilorama/forest_test.go +++ b/pkg/local_object_storage/pilorama/forest_test.go @@ -1,7 +1,6 @@ package pilorama import ( - "errors" "math/rand" "os" "path/filepath" @@ -184,10 +183,10 @@ func testForestTreeAdd(t *testing.T, s Forest) { t.Run("other trees are unaffected", func(t *testing.T) { _, err := s.TreeGetByPath(cid, treeID+"123", AttributeFilename, []string{"file.txt"}, false) - require.True(t, errors.Is(err, ErrTreeNotFound), "got: %v", err) + require.ErrorIs(t, err, ErrTreeNotFound) _, err = s.TreeGetMeta(cid, treeID+"123", 0) - require.True(t, errors.Is(err, ErrTreeNotFound), "got: %v", err) + require.ErrorIs(t, err, ErrTreeNotFound) }) }