Skip to content

Commit

Permalink
test: use coverage instead of equality to test error payload
Browse files Browse the repository at this point in the history
We are going to add missing 'user' payload field for ACCESS_DENIED error
which will break current tests. Let fix tests to allow adding
new payload fields for errors.

Need for tarantool/tarantool#9108
  • Loading branch information
nshy committed Mar 29, 2024
1 parent edde459 commit 8dffb1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
require (
github.com/google/uuid v1.3.0
github.com/shopspring/decimal v1.3.1
github.com/stretchr/testify v1.7.1
github.com/stretchr/testify v1.9.0
github.com/tarantool/go-iproto v1.0.0
github.com/vmihailenco/msgpack/v5 v5.3.5
)
Expand Down
2 changes: 1 addition & 1 deletion test_helpers/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func CheckEqualBoxErrors(t *testing.T, expected tarantool.BoxError, actual taran
require.Equal(t, expected.Msg, actual.Msg)
require.Equal(t, expected.Errno, actual.Errno)
require.Equal(t, expected.Code, actual.Code)
require.Equal(t, expected.Fields, actual.Fields)
require.Subset(t, actual.Fields, expected.Fields)

if expected.Prev != nil {
// Stack depth is the same
Expand Down

0 comments on commit 8dffb1e

Please sign in to comment.