Skip to content

Commit

Permalink
test: fix compare_box_errors invocation
Browse files Browse the repository at this point in the history
The function signature is (expected, actual) so expected should be
called first. It is significant as the function checks that all payload
fields of expected are present in actual. The reverse inclusion is not
true generally speaking.

Need for tarantool/tarantool#9108
  • Loading branch information
nshy committed Apr 3, 2024
1 parent dcd0934 commit 660269c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions box_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func TestErrorTypeInsert(t *testing.T) {
local tuple_err = tuple[2]
assert(tuple_err ~= nil)
return compare_box_errors(err, tuple_err)
return compare_box_errors(tuple_err, err)
`, testcase.ttObj, space, testcase.tuple.pk)

// In fact, compare_box_errors does not check than File and Line
Expand Down Expand Up @@ -400,7 +400,7 @@ func TestErrorTypeInsertTyped(t *testing.T) {
local tuple_err = tuple[2]
assert(tuple_err ~= nil)
return compare_box_errors(err, tuple_err)
return compare_box_errors(tuple_err, err)
`, testcase.ttObj, space, testcase.tuple.pk)

// In fact, compare_box_errors does not check than File and Line
Expand Down

0 comments on commit 660269c

Please sign in to comment.