Skip to content

Commit 8dffb1e

Browse files
committed
test: use coverage instead of equality to test error payload
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
1 parent edde459 commit 8dffb1e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.20
55
require (
66
github.com/google/uuid v1.3.0
77
github.com/shopspring/decimal v1.3.1
8-
github.com/stretchr/testify v1.7.1
8+
github.com/stretchr/testify v1.9.0
99
github.com/tarantool/go-iproto v1.0.0
1010
github.com/vmihailenco/msgpack/v5 v5.3.5
1111
)

test_helpers/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ func CheckEqualBoxErrors(t *testing.T, expected tarantool.BoxError, actual taran
244244
require.Equal(t, expected.Msg, actual.Msg)
245245
require.Equal(t, expected.Errno, actual.Errno)
246246
require.Equal(t, expected.Code, actual.Code)
247-
require.Equal(t, expected.Fields, actual.Fields)
247+
require.Subset(t, actual.Fields, expected.Fields)
248248

249249
if expected.Prev != nil {
250250
// Stack depth is the same

0 commit comments

Comments
 (0)