Skip to content

Commit 2bf9fb8

Browse files
committed
test: make simple_operations_test compatible with Tarantool 2.8
After tarantool/tarantool#3378 it's possible to perform updates with gaps. So one of testcases that returned an error became irrelevant for 2.8+. This patch checks that update is valid for new Tarantool versions. Also it's not complete 2.8 support because of a bug tarantool/tarantool#6069. But since issue has been already resolved we should just wait for update.
1 parent 8f67230 commit 2bf9fb8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/integration/simple_operations_test.lua

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,16 @@ pgroup:add('test_intermediate_nullable_fields_update', function(g)
426426
}
427427
})
428428

429-
-- This tests use jsonpath updates.
430-
if _TARANTOOL >= "2.3" then
429+
-- Test uses jsonpaths so it should be run for version 2.3+
430+
-- where jsonpaths are supported (https://github.com/tarantool/tarantool/issues/1261).
431+
-- However since 2.8 Tarantool could update intermediate nullable fields
432+
-- (https://github.com/tarantool/tarantool/issues/3378).
433+
-- So before 2.8 update returns an error but after it update is correct.
434+
if _TARANTOOL > "2.8" then
435+
local _, err = g.cluster.main_server.net_box:call('crud.update',
436+
{'developers', 1, {{'=', '[5].a.b[1]', 3}, {'=', 'extra_5', 'extra_value_5'}}})
437+
t.assert_equals(err, nil)
438+
elseif _TARANTOOL >= "2.3" then
431439
local _, err = g.cluster.main_server.net_box:call('crud.update',
432440
{'developers', 1, {{'=', '[5].a.b[1]', 3}, {'=', 'extra_5', 'extra_value_5'}}})
433441
t.assert_equals(err.err, "Failed to update: Field ''extra_5'' was not found in the tuple")

0 commit comments

Comments
 (0)