Skip to content

tests: added test for Body() methods of requests using golden files #450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
519 changes: 519 additions & 0 deletions golden_test.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tarantool/go-iproto"
"github.com/vmihailenco/msgpack/v5"

"github.com/tarantool/go-iproto"
. "github.com/tarantool/go-tarantool/v2"
)

Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/requests/begin-with-txn-isolation-is-sync.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚YaÃ
1 change: 1 addition & 0 deletions testdata/requests/begin-with-txn-isolation.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Y
1 change: 1 addition & 0 deletions testdata/requests/begin.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 change: 1 addition & 0 deletions testdata/requests/call-no-args.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚"­function.name!
1 change: 1 addition & 0 deletions testdata/requests/call-with-args-empty-array.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚"­function.name!
Binary file added testdata/requests/call-with-args-mixed.msgpack
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/requests/call-with-args-nil.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚"­function.name!
1 change: 1 addition & 0 deletions testdata/requests/call-with-args.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚"­function.name!“
1 change: 1 addition & 0 deletions testdata/requests/call16-with-args-nil.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚"­function.name!
Binary file added testdata/requests/call16-with-args.msgpack
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/requests/call16.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚"­function.name!
1 change: 1 addition & 0 deletions testdata/requests/call17-with-args-nil.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚"­function.name!
Binary file added testdata/requests/call17-with-args.msgpack
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/requests/call17.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚"­function.name!
1 change: 1 addition & 0 deletions testdata/requests/commit-raw.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1 change: 1 addition & 0 deletions testdata/requests/commit-with-sync-false.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aÂ
1 change: 1 addition & 0 deletions testdata/requests/commit-with-sync.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aÃ
Binary file added testdata/requests/delete-raw.msgpack
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/requests/delete-sname-iname.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ƒ^ªtable_name_ªindex_name ‘{
1 change: 1 addition & 0 deletions testdata/requests/delete-sname-inumber.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ƒ^ªtable_name{ ‘{
1 change: 1 addition & 0 deletions testdata/requests/delete-snumber-iname.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ƒÌö_ªindex_name ‘{
1 change: 1 addition & 0 deletions testdata/requests/delete-snumber-inumber.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ƒÌö{ ‘{
Binary file added testdata/requests/delete.msgpack
Binary file not shown.
Binary file added testdata/requests/eval-with-args.msgpack
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/requests/eval-with-empty-array.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚'¯function_name()!
1 change: 1 addition & 0 deletions testdata/requests/eval-with-nil.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚'¯function_name()!
1 change: 1 addition & 0 deletions testdata/requests/eval-with-single-number.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚'¯function_name()!
1 change: 1 addition & 0 deletions testdata/requests/eval.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
‚'¯function_name()!
Binary file added testdata/requests/insert-sname.msgpack
Binary file not shown.
Binary file added testdata/requests/insert-snumber.msgpack
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/requests/ping.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Binary file added testdata/requests/replace-sname.msgpack
Binary file not shown.
Binary file added testdata/requests/replace-snumber.msgpack
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/requests/rollback.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Binary file added testdata/requests/select
Binary file not shown.
Binary file added testdata/requests/select-key-sname-iname.msgpack
Binary file not shown.
Binary file added testdata/requests/select-key-sname-inumber.msgpack
Binary file not shown.
Binary file added testdata/requests/select-key-snumber-iname.msgpack
Binary file not shown.
Binary file not shown.
Binary file added testdata/requests/select-sname-iname.msgpack
Binary file not shown.
Binary file added testdata/requests/select-sname-inumber.msgpack
Binary file not shown.
Binary file added testdata/requests/select-snumber-iname.msgpack
Binary file not shown.
Binary file added testdata/requests/select-snumber-inumber.msgpack
Binary file not shown.
Binary file added testdata/requests/select-with-after.msgpack
Binary file not shown.
Binary file added testdata/requests/select-with-key.msgpack
Binary file not shown.
Binary file added testdata/requests/select-with-optionals.msgpack
Binary file not shown.
2 changes: 2 additions & 0 deletions testdata/requests/update-sname-iname.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
„^ªtable_name_ªindex_name ‘{!™“¡+¤test“¡=¤fest“¡# “¡!¦insert•¡:¦splice“¡-¨subtract“¡&
“¡| “¡^
2 changes: 2 additions & 0 deletions testdata/requests/update-sname-inumber.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
„^ªtable_name{ ‘{!™“¡+¤test“¡=¤fest“¡# “¡!¦insert•¡:¦splice“¡-¨subtract“¡&
“¡| “¡^
2 changes: 2 additions & 0 deletions testdata/requests/update-snumber-iname.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
„{_ªindex_name ‘{!™“¡+¤test“¡=¤fest“¡# “¡!¦insert•¡:¦splice“¡-¨subtract“¡&
“¡| “¡^
Binary file added testdata/requests/update.msgpack
Binary file not shown.
Binary file added testdata/requests/upsert-sname.msgpack
Binary file not shown.
Binary file added testdata/requests/upsert-snumber.msgpack
Binary file not shown.
1 change: 1 addition & 0 deletions testdata/requests/upsert.msgpack
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ƒ^ªtable_name!(
Loading