Skip to content

Commit fbc69d4

Browse files
committed
tests: update a negative check of MP_ARROW decoding
The patch updates a check according to a latest Tarantool 3.3.0 release. Closes #415
1 parent ee82151 commit fbc69d4

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

arrow/tarantool_test.go

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,15 @@ var opts = tarantool.Opts{
3535
func TestInsert_invalid(t *testing.T) {
3636
arrows := []struct {
3737
arrow string
38-
expected []iproto.Error
38+
expected iproto.Error
3939
}{
4040
{
4141
"",
42-
// TODO: delete iproto.ER_ARROW_IPC_DECODE, see:
43-
// https://github.com/tarantool/go-tarantool/issues/415
44-
[]iproto.Error{iproto.ER_INVALID_MSGPACK, iproto.ER_ARROW_IPC_DECODE},
42+
iproto.ER_INVALID_MSGPACK,
4543
},
4644
{
4745
"00",
48-
// TODO: delete iproto.ER_ARROW_IPC_DECODE, see:
49-
// https://github.com/tarantool/go-tarantool/issues/415
50-
[]iproto.Error{iproto.ER_INVALID_MSGPACK, iproto.ER_ARROW_IPC_DECODE},
46+
iproto.ER_INVALID_MSGPACK,
5147
},
5248
{
5349
"ffffffff70000000040000009effffff0400010004000000" +
@@ -59,7 +55,7 @@ func TestInsert_invalid(t *testing.T) {
5955
"00000000000000000000000000000800000000000000000000000100000001000000" +
6056
"0000000000000000000000000a00140004000c0010000c0014000400060008000c00" +
6157
"00000000000000000000",
62-
[]iproto.Error{iproto.ER_UNSUPPORTED},
58+
iproto.ER_UNSUPPORTED,
6359
},
6460
}
6561

@@ -78,13 +74,7 @@ func TestInsert_invalid(t *testing.T) {
7874
_, err = conn.Do(req).Get()
7975
ttErr := err.(tarantool.Error)
8076

81-
require.Contains(t, a.expected, ttErr.Code)
82-
// TODO: replace the check with:
83-
//
84-
// require.Equal(t, a.expected, ttErr.Code)
85-
//
86-
// See:
87-
// https://github.com/tarantool/go-tarantool/issues/415
77+
require.Equal(t, a.expected, ttErr.Code)
8878
})
8979
}
9080

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/google/uuid v1.3.0
77
github.com/shopspring/decimal v1.3.1
88
github.com/stretchr/testify v1.9.0
9-
github.com/tarantool/go-iproto v1.0.1-0.20241010173538-44b6566ef267
9+
github.com/tarantool/go-iproto v1.1.0
1010
github.com/vmihailenco/msgpack/v5 v5.3.5
1111
)
1212

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
1111
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
1212
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
1313
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
14-
github.com/tarantool/go-iproto v1.0.1-0.20241010173538-44b6566ef267 h1:GenzvYfP9io9aEdZFmnopfcBOXmJg6MgBWyd4t8z4oI=
15-
github.com/tarantool/go-iproto v1.0.1-0.20241010173538-44b6566ef267/go.mod h1:LNCtdyZxojUed8SbOiYHoc3v9NvaZTB7p96hUySMlIo=
14+
github.com/tarantool/go-iproto v1.1.0 h1:HULVOIHsiehI+FnHfM7wMDntuzUddO09DKqu2WnFQ5A=
15+
github.com/tarantool/go-iproto v1.1.0/go.mod h1:LNCtdyZxojUed8SbOiYHoc3v9NvaZTB7p96hUySMlIo=
1616
github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU=
1717
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
1818
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=

0 commit comments

Comments
 (0)