Skip to content

Commit

Permalink
[chore]: enable error-is-as rule from testifylint
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed Sep 22, 2024
1 parent c5d8ab9 commit 028cc9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ linters-settings:
enable-all: true
disable:
- compares
- error-is-as
- expected-actual
- float-compare
- formatter
Expand Down
7 changes: 3 additions & 4 deletions samplers/probability/consistent/tracestate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package consistent

import (
"errors"
"strconv"
"strings"
"testing"
Expand Down Expand Up @@ -91,7 +90,7 @@ func TestParseTraceStateUnsampled(t *testing.T) {
require.False(t, otts.hasPValue(), "should have no p-value")

if test.expectErr != nil {
require.True(t, errors.Is(err, test.expectErr), "not expecting %v", err)
require.ErrorIs(t, err, test.expectErr, "not expecting %v", err)
}
if test.rval != notset {
require.True(t, otts.hasRValue())
Expand Down Expand Up @@ -168,7 +167,7 @@ func TestParseTraceStateSampled(t *testing.T) {
otts, err := parseOTelTraceState(test.in, true)

if test.expectErr != nil {
require.True(t, errors.Is(err, test.expectErr), "not expecting %v", err)
require.ErrorIs(t, err, test.expectErr, "not expecting %v", err)
} else {
require.NoError(t, err)
}
Expand Down Expand Up @@ -252,7 +251,7 @@ func TestParseTraceStateExtra(t *testing.T) {
otts, err := parseOTelTraceState(test.in, test.sampled)

if test.expectErr != nil {
require.True(t, errors.Is(err, test.expectErr), "not expecting %v", err)
require.ErrorIs(t, err, test.expectErr, "not expecting %v", err)
} else {
require.NoError(t, err)
}
Expand Down

0 comments on commit 028cc9b

Please sign in to comment.