diff --git a/test/integration/pairs_readview_test.lua b/test/integration/pairs_readview_test.lua index 5f5c2806..4917af3d 100644 --- a/test/integration/pairs_readview_test.lua +++ b/test/integration/pairs_readview_test.lua @@ -43,7 +43,7 @@ pgroup.before_each(function(g) end) -pgroup.test_pairs_no_conditions_readview = function(g) +pgroup.test_pairs_no_conditions = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -74,7 +74,7 @@ pgroup.test_pairs_no_conditions_readview = function(g) local crud = require('crud') local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers') do table.insert(objects, object) end @@ -88,7 +88,7 @@ pgroup.test_pairs_no_conditions_readview = function(g) local crud = require('crud') local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', nil, {use_tomap = false}) do table.insert(objects, object) end @@ -103,7 +103,7 @@ pgroup.test_pairs_no_conditions_readview = function(g) local crud = require('crud') local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', nil, {use_tomap = true}) do table.insert(objects, object) end @@ -121,7 +121,7 @@ pgroup.test_pairs_no_conditions_readview = function(g) local after = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', nil, {after = after, use_tomap = true}) do table.insert(objects, object) end @@ -140,7 +140,7 @@ pgroup.test_pairs_no_conditions_readview = function(g) local after = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', nil, {after = after, use_tomap = true}) do table.insert(objects, object) end @@ -152,7 +152,7 @@ pgroup.test_pairs_no_conditions_readview = function(g) t.assert_equals(#objects, 0) end -pgroup.test_ge_condition_with_index_readview = function(g) +pgroup.test_ge_condition_with_index = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -182,7 +182,7 @@ pgroup.test_ge_condition_with_index_readview = function(g) local conditions = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', conditions, {use_tomap = true}) do table.insert(objects, object) end @@ -202,7 +202,7 @@ pgroup.test_ge_condition_with_index_readview = function(g) local conditions, after = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', conditions, {after = after, use_tomap = true}) do table.insert(objects, object) end @@ -214,7 +214,7 @@ pgroup.test_ge_condition_with_index_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {2, 4})) -- in age order end -pgroup.test_le_condition_with_index_readview = function(g) +pgroup.test_le_condition_with_index = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -242,7 +242,7 @@ pgroup.test_le_condition_with_index_readview = function(g) local crud = require('crud') local conditions = ... - foo = crud.readview('foo') + local foo = crud.readview('foo') local objects = {} for _, object in foo:pairs('customers', conditions, {use_tomap = true}) do table.insert(objects, object) @@ -262,7 +262,7 @@ pgroup.test_le_condition_with_index_readview = function(g) local conditions, after = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', conditions, {after = after, use_tomap = true}) do table.insert(objects, object) end @@ -274,7 +274,7 @@ pgroup.test_le_condition_with_index_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {1})) -- in age order end -pgroup.test_first_readview = function(g) +pgroup.test_first = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -294,7 +294,7 @@ pgroup.test_first_readview = function(g) local objects, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', nil, {first = 2, use_tomap = true}) do table.insert(objects, object) end @@ -307,7 +307,7 @@ pgroup.test_first_readview = function(g) local tuples, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') local tuples = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, tuple in foo:pairs('customers', nil, {first = 2}) do table.insert(tuples, tuple) end @@ -321,7 +321,7 @@ pgroup.test_first_readview = function(g) }) end -pgroup.test_negative_first_readview = function(g) +pgroup.test_negative_first = function(g) local customers = helpers.insert_objects(g, 'customers',{ { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -341,18 +341,18 @@ pgroup.test_negative_first_readview = function(g) t.assert_error_msg_contains("Negative first isn't allowed for pairs", function() g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo = crud.readview('foo') + local foo = crud.readview('foo') foo:pairs('customers', nil, {first = -10}) foo:close() ]]) end) end -pgroup.test_empty_space_readview = function(g) +pgroup.test_empty_space = function(g) local count = g.cluster.main_server.net_box:eval([[ local crud = require('crud') local count = 0 - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers') do count = count + 1 end @@ -362,7 +362,7 @@ pgroup.test_empty_space_readview = function(g) t.assert_equals(count, 0) end -pgroup.test_luafun_compatibility_readview = function(g) +pgroup.test_luafun_compatibility = function(g) helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -377,7 +377,7 @@ pgroup.test_luafun_compatibility_readview = function(g) }) local count = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo = crud.readview('foo') + local foo = crud.readview('foo') local count = foo:pairs('customers'):map(function() return 1 end):sum() foo:close() return count @@ -386,7 +386,7 @@ pgroup.test_luafun_compatibility_readview = function(g) count = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo = crud.readview('foo') + local foo = crud.readview('foo') local count = foo:pairs('customers', {use_tomap = true}):map(function() return 1 end):sum() foo:close() @@ -395,7 +395,7 @@ pgroup.test_luafun_compatibility_readview = function(g) t.assert_equals(count, 3) end -pgroup.test_pairs_partial_result_readview = function(g) +pgroup.test_pairs_partial_result = function(g) helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -432,7 +432,7 @@ pgroup.test_pairs_partial_result_readview = function(g) local conditions, fields = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', conditions, {use_tomap = true, fields = fields}) do table.insert(objects, object) end @@ -453,7 +453,7 @@ pgroup.test_pairs_partial_result_readview = function(g) local conditions, fields = ... local tuples = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, tuple in foo:pairs('customers', conditions, {fields = fields}) do table.insert(tuples, tuple) end @@ -484,7 +484,7 @@ pgroup.test_pairs_partial_result_readview = function(g) local conditions, fields = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', conditions, {use_tomap = true, fields = fields}) do table.insert(objects, object) end @@ -505,7 +505,7 @@ pgroup.test_pairs_partial_result_readview = function(g) local conditions, fields = ... local tuples = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, tuple in foo:pairs('customers', conditions, {fields = fields}) do table.insert(tuples, tuple) end @@ -539,7 +539,7 @@ pgroup.test_pairs_partial_result_readview = function(g) local conditions, fields = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', conditions, {use_tomap = true, fields = fields}) do table.insert(objects, object) end @@ -560,7 +560,7 @@ pgroup.test_pairs_partial_result_readview = function(g) local conditions, fields = ... local tuples = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, tuple in foo:pairs('customers', conditions, {fields = fields}) do table.insert(tuples, tuple) end @@ -592,7 +592,7 @@ pgroup.test_pairs_partial_result_readview = function(g) local conditions, fields = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', conditions, {use_tomap = true, fields = fields}) do table.insert(objects, object) @@ -615,7 +615,7 @@ pgroup.test_pairs_partial_result_readview = function(g) local conditions, fields = ... local tuples = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, tuple in foo:pairs('customers', conditions, {fields = fields}) do table.insert(tuples, tuple) end @@ -631,7 +631,7 @@ pgroup.test_pairs_partial_result_readview = function(g) t.assert_equals(objects, expected_customers) end -pgroup.test_pairs_force_map_call_readview = function(g) +pgroup.test_pairs_force_map_call = function(g) local key = 1 local first_bucket_id = g.cluster.main_server.net_box:eval([[ @@ -665,7 +665,7 @@ pgroup.test_pairs_force_map_call_readview = function(g) local conditions = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', conditions, {use_tomap = true}) do table.insert(objects, object) end @@ -683,7 +683,7 @@ pgroup.test_pairs_force_map_call_readview = function(g) local conditions = ... local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', conditions, {use_tomap = true, force_map_call = true}) do table.insert(objects, object) end @@ -695,7 +695,7 @@ pgroup.test_pairs_force_map_call_readview = function(g) t.assert_equals(objects, customers) end -pgroup.test_pairs_timeout_readview = function(g) +pgroup.test_pairs_timeout = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -725,7 +725,7 @@ pgroup.test_pairs_timeout_readview = function(g) local crud = require('crud') local objects = {} - foo = crud.readview('foo') + local foo = crud.readview('foo') for _, object in foo:pairs('customers', nil, {timeout = 1}) do table.insert(objects, object) end @@ -738,7 +738,7 @@ end -- gh-220: bucket_id argument is ignored when it cannot be deduced -- from provided select/pairs conditions. -pgroup.test_pairs_no_map_reduce_readview = function(g) +pgroup.test_pairs_no_map_reduce = function(g) local customers = helpers.insert_objects(g, 'customers', { { -- bucket_id is 477, storage is s-2 @@ -767,7 +767,7 @@ pgroup.test_pairs_no_map_reduce_readview = function(g) -- Case: no conditions, just bucket id. local rows = router:eval([[ local crud = require('crud') - foo = crud.readview('foo') + local foo = crud.readview('foo') local rows = foo:pairs(...):totable() foo:close() @@ -789,7 +789,7 @@ pgroup.test_pairs_no_map_reduce_readview = function(g) -- index (primary index in the case). local rows = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo = crud.readview('foo') + local foo = crud.readview('foo') local rows = foo:pairs(...):totable() foo:close() return rows diff --git a/test/integration/select_readview_test.lua b/test/integration/select_readview_test.lua index 2352949f..1582c367 100644 --- a/test/integration/select_readview_test.lua +++ b/test/integration/select_readview_test.lua @@ -47,13 +47,10 @@ pgroup.before_each(function(g) helpers.truncate_space_on_cluster(g.cluster, 'cars') end) - - -pgroup.test_non_existent_space_readview = function(g) - -- insert +pgroup.test_non_existent_space = function(g) local obj, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo = crud.readview('foo') + local foo = crud.readview('foo') local result, err = foo:select('non_existent_space', nil, {fullscan=true}) @@ -65,10 +62,10 @@ pgroup.test_non_existent_space_readview = function(g) t.assert_str_contains(err.err, "Space \"non_existent_space\" doesn't exist") end -pgroup.test_select_no_index_readview = function(g) +pgroup.test_select_no_index = function(g) local obj, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo = crud.readview('foo') + local foo = crud.readview('foo') local result, err = foo:select('no_index_space', nil, {fullscan=true}) @@ -80,7 +77,7 @@ pgroup.test_select_no_index_readview = function(g) t.assert_str_contains(err.err, "Space \"no_index_space\" has no indexes, space should have primary index") end -pgroup.test_invalid_value_type_readview = function(g) +pgroup.test_invalid_value_type = function(g) local conditions = { {'=', 'id', 'not_number'} } @@ -89,7 +86,7 @@ pgroup.test_invalid_value_type_readview = function(g) local crud = require('crud') local conditions = ... - foo = crud.readview('foo') + local foo = crud.readview('foo') local result, err = foo:select('customers', conditions) @@ -108,7 +105,7 @@ end collectgarbage("collect") collectgarbage("collect") ]]-- -pgroup.test_select_readview_all = function(g) +pgroup.test_select_all = function(g) helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -145,7 +142,7 @@ pgroup.test_select_readview_all = function(g) end -pgroup.test_select_readview_with_same_name = function(g) +pgroup.test_select_with_same_name = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -166,8 +163,8 @@ pgroup.test_select_readview_with_same_name = function(g) local obj, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo = crud.readview('foo') - boo = crud.readview('foo') + local foo = crud.readview('foo') + local boo = crud.readview('foo') foo:close() local result, err = boo:select('customers', nil, {fullscan = true}) @@ -186,7 +183,7 @@ pgroup.test_select_readview_with_same_name = function(g) end -pgroup.test_select_readview_without_name = function(g) +pgroup.test_select_without_name = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -207,7 +204,7 @@ pgroup.test_select_readview_without_name = function(g) local obj, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - boo = crud.readview('') + local boo = crud.readview('') local result, err = boo:select('customers', nil, {fullscan = true}) @@ -225,7 +222,7 @@ pgroup.test_select_readview_without_name = function(g) end -pgroup.test_select_readview_with_insert = function(g) +pgroup.test_select_with_insert = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -246,7 +243,7 @@ pgroup.test_select_readview_with_insert = function(g) local obj, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - boo = crud.readview('') + local boo = crud.readview('') rawset(_G, 'boo', boo) local result, err = boo:select('customers', nil, {fullscan = true}) @@ -286,7 +283,7 @@ pgroup.test_select_readview_with_insert = function(g) end -pgroup.test_select_readview_with_delete = function(g) +pgroup.test_select_with_delete = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -346,7 +343,7 @@ end -pgroup.test_select_readview_all_with_batch_size = function(g) +pgroup.test_select_all_with_batch_size = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -380,7 +377,7 @@ pgroup.test_select_readview_all_with_batch_size = function(g) -- batch size 1 local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', nil, {batch_size=1, fullscan = true}) @@ -394,7 +391,7 @@ pgroup.test_select_readview_all_with_batch_size = function(g) -- batch size 3 local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - bar, err = crud.readview('bar') + local bar, err = crud.readview('bar') local result, err = bar:select('customers', nil, {batch_size=3, fullscan = true}) @@ -406,7 +403,7 @@ pgroup.test_select_readview_all_with_batch_size = function(g) t.assert_equals(objects, customers) end -pgroup.test_eq_condition_with_index_readview = function(g) +pgroup.test_eq_condition_with_index = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -447,7 +444,7 @@ pgroup.test_eq_condition_with_index_readview = function(g) local conditions = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions) @@ -467,7 +464,7 @@ pgroup.test_eq_condition_with_index_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{after=after}) @@ -486,7 +483,7 @@ pgroup.test_eq_condition_with_index_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{after=after, first = -10}) @@ -506,7 +503,7 @@ pgroup.test_eq_condition_with_index_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{after=after, first = 10}) @@ -525,7 +522,7 @@ pgroup.test_eq_condition_with_index_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{after=after, first = -10}) @@ -544,7 +541,7 @@ pgroup.test_eq_condition_with_index_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{after=after, first = 10}) @@ -563,7 +560,7 @@ pgroup.test_eq_condition_with_index_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{after=after, first = -10}) @@ -576,7 +573,7 @@ pgroup.test_eq_condition_with_index_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {1, 3, 5, 7})) -- in id order end -pgroup.test_lt_condition_with_index_readview = function(g) +pgroup.test_lt_condition_with_index = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -605,7 +602,7 @@ pgroup.test_lt_condition_with_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fullscan=true}) @@ -624,7 +621,7 @@ pgroup.test_lt_condition_with_index_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{after=after, fullscan=true}) @@ -637,7 +634,7 @@ pgroup.test_lt_condition_with_index_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {})) -- in age order end -pgroup.test_multiple_conditions_readview = function(g) +pgroup.test_multiple_conditions = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Rodriguez", @@ -671,7 +668,7 @@ pgroup.test_multiple_conditions_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fullscan=true}) @@ -690,7 +687,7 @@ pgroup.test_multiple_conditions_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{after=after, fullscan=true}) @@ -703,7 +700,7 @@ pgroup.test_multiple_conditions_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {2})) -- in age order end -pgroup.test_composite_index_readview = function(g) +pgroup.test_composite_index = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Rodriguez", @@ -732,7 +729,7 @@ pgroup.test_composite_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fullscan=true}) @@ -751,7 +748,7 @@ pgroup.test_composite_index_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{after=after, fullscan=true}) @@ -773,7 +770,7 @@ pgroup.test_composite_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fullscan=true}) @@ -792,7 +789,7 @@ pgroup.test_composite_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{first=1}) @@ -809,7 +806,7 @@ pgroup.test_composite_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', {{'==', 'full_name', {'Elizabeth', 'Johnson'}}}, {first = 1}) @@ -821,7 +818,7 @@ pgroup.test_composite_index_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {2})) -- in full_name order end -pgroup.test_composite_primary_index_readview = function(g) +pgroup.test_composite_primary_index = function(g) local book_translation = helpers.insert_objects(g, 'book_translation', { { id = 5, @@ -840,7 +837,7 @@ pgroup.test_composite_primary_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('book_translation', conditions) @@ -855,7 +852,7 @@ pgroup.test_composite_primary_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('book_translation', conditions, {first = 2}) @@ -870,7 +867,7 @@ pgroup.test_composite_primary_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('book_translation', conditions, {first = 1}) @@ -885,7 +882,7 @@ pgroup.test_composite_primary_index_readview = function(g) local conditions, after = ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('book_translation', conditions, {first = 1, after = after}) @@ -896,7 +893,7 @@ pgroup.test_composite_primary_index_readview = function(g) t.assert_equals(#result.rows, 0) end -pgroup.test_select_with_batch_size_1_readview = function(g) +pgroup.test_select_with_batch_size_1 = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -934,7 +931,7 @@ pgroup.test_select_with_batch_size_1_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{batch_size=1, fullscan = true}) @@ -953,7 +950,7 @@ pgroup.test_select_with_batch_size_1_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{batch_size=1, fullscan = true}) @@ -972,7 +969,7 @@ pgroup.test_select_with_batch_size_1_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{batch_size=1, fullscan = true}) @@ -991,7 +988,7 @@ pgroup.test_select_with_batch_size_1_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{batch_size=1, fullscan = true}) @@ -1004,7 +1001,7 @@ pgroup.test_select_with_batch_size_1_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {8, 2, 4})) end -pgroup.test_select_by_full_sharding_key_readview = function(g) +pgroup.test_select_by_full_sharding_key = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -1026,7 +1023,7 @@ pgroup.test_select_by_full_sharding_key_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions) @@ -1039,7 +1036,7 @@ pgroup.test_select_by_full_sharding_key_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {3})) end -pgroup.test_select_with_collations_readview = function(g) +pgroup.test_select_with_collations = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -1071,7 +1068,7 @@ pgroup.test_select_with_collations_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions) @@ -1090,7 +1087,7 @@ pgroup.test_select_with_collations_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions) @@ -1103,7 +1100,7 @@ pgroup.test_select_with_collations_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {2, 4})) end -pgroup.test_multipart_primary_index_readview = function(g) +pgroup.test_multipart_primary_index = function(g) local coords = helpers.insert_objects(g, 'coord', { { x = 0, y = 0 }, -- 1 { x = 0, y = 1 }, -- 2 @@ -1118,7 +1115,7 @@ pgroup.test_multipart_primary_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('coord', conditions) @@ -1134,7 +1131,7 @@ pgroup.test_multipart_primary_index_readview = function(g) local conditions, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('coord', conditions,{after = after}) @@ -1151,7 +1148,7 @@ pgroup.test_multipart_primary_index_readview = function(g) local conditions, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('coord', conditions,{after = after, first = -2}) @@ -1168,7 +1165,7 @@ pgroup.test_multipart_primary_index_readview = function(g) local conditions, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('coord', conditions,{after = after, first = -2}) @@ -1185,7 +1182,7 @@ pgroup.test_multipart_primary_index_readview = function(g) local conditions, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('coord', conditions) @@ -1202,7 +1199,7 @@ pgroup.test_multipart_primary_index_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('coord', conditions,{fullscan=true}) @@ -1218,7 +1215,7 @@ pgroup.test_multipart_primary_index_readview = function(g) local conditions, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('coord', conditions,{after = after,fullscan = true}) @@ -1234,7 +1231,7 @@ pgroup.test_multipart_primary_index_readview = function(g) local conditions, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('coord', conditions,{after = after,first = -3}) @@ -1246,7 +1243,7 @@ pgroup.test_multipart_primary_index_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(coords, {1, 2})) end -pgroup.test_select_partial_result_bad_input_readview = function(g) +pgroup.test_select_partial_result_bad_input = function(g) helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -1269,7 +1266,7 @@ pgroup.test_select_partial_result_bad_input_readview = function(g) local conditions= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fields = {'id', 'mame'}, fullscan = true}) @@ -1281,7 +1278,7 @@ pgroup.test_select_partial_result_bad_input_readview = function(g) t.assert_str_contains(err.err, 'Space format doesn\'t contain field named "mame"') end -pgroup.test_select_partial_result_readview = function(g) +pgroup.test_select_partial_result = function(g) helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -1317,7 +1314,7 @@ pgroup.test_select_partial_result_readview = function(g) local conditions, fields= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fields = fields, fullscan = true}) @@ -1340,7 +1337,7 @@ pgroup.test_select_partial_result_readview = function(g) local conditions, fields, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fields = fields, after = after, fullscan = true}) @@ -1368,7 +1365,7 @@ pgroup.test_select_partial_result_readview = function(g) local conditions, fields= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fields = fields, fullscan = true}) @@ -1391,7 +1388,7 @@ pgroup.test_select_partial_result_readview = function(g) local conditions, fields, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fields = fields, after = after, fullscan = true}) @@ -1422,7 +1419,7 @@ pgroup.test_select_partial_result_readview = function(g) local conditions, fields= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fields = fields, fullscan = true}) @@ -1445,7 +1442,7 @@ pgroup.test_select_partial_result_readview = function(g) local conditions, fields, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fields = fields, after = after, fullscan = true}) @@ -1474,7 +1471,7 @@ pgroup.test_select_partial_result_readview = function(g) local conditions, fields= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fields = fields, fullscan = true}) @@ -1497,7 +1494,7 @@ pgroup.test_select_partial_result_readview = function(g) local conditions, fields, after= ... - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', conditions,{fields = fields, after = after, fullscan = true}) @@ -1510,7 +1507,7 @@ pgroup.test_select_partial_result_readview = function(g) t.assert_equals(objects, expected_customers) end -pgroup.test_select_force_map_call_readview = function(g) +pgroup.test_select_force_map_call = function(g) local key = 1 local first_bucket_id = g.cluster.main_server.net_box:eval([[ @@ -1539,7 +1536,7 @@ pgroup.test_select_force_map_call_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', {{'==', 'id', 1}}) @@ -1553,7 +1550,7 @@ pgroup.test_select_force_map_call_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', {{'==', 'id', 1}}, {force_map_call = true}) @@ -1568,7 +1565,7 @@ pgroup.test_select_force_map_call_readview = function(g) t.assert_equals(objects, customers) end -pgroup.test_jsonpath_readview = function(g) +pgroup.test_jsonpath = function(g) helpers.insert_objects(g, 'developers', { { id = 1, name = "Alexey", last_name = "Smith", @@ -1590,7 +1587,7 @@ pgroup.test_jsonpath_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('developers', {{'>=', '[5]', 40}}, {fields = {'name', 'last_name'}, fullscan = true}) @@ -1609,7 +1606,7 @@ pgroup.test_jsonpath_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('developers', {{'<', '["age"]', 21}}, {fields = {'name', 'last_name'}, fullscan = true}) @@ -1627,7 +1624,7 @@ pgroup.test_jsonpath_readview = function(g) t.assert_equals(objects, expected_objects) end -pgroup.test_jsonpath_index_field_readview = function(g) +pgroup.test_jsonpath_index_field = function(g) t.skip_if( not crud_utils.tarantool_supports_jsonpath_indexes(), "Jsonpath indexes supported since 2.6.3/2.7.2/2.8.1" @@ -1664,7 +1661,7 @@ pgroup.test_jsonpath_index_field_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('cars', {{'<=', 'id_ind', 3}, {'<=', 'age', 5}}, {fields = {'id', 'age'}, fullscan = true}) @@ -1691,7 +1688,7 @@ pgroup.test_jsonpath_index_field_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('cars', {{'==', 'data_index', 'Yellow'}}, {fields = {'id', 'age'}}) @@ -1719,7 +1716,7 @@ pgroup.test_jsonpath_index_field_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('cars', {{'==', 'data_index', {'Yellow', 'Mercedes'}}}, {fields = {'id', 'age'}}) @@ -1739,7 +1736,7 @@ pgroup.test_jsonpath_index_field_readview = function(g) t.assert_equals(objects, expected_objects) end -pgroup.test_jsonpath_index_field_pagination_readview = function(g) +pgroup.test_jsonpath_index_field_pagination = function(g) t.skip_if( not crud_utils.tarantool_supports_jsonpath_indexes(), "Jsonpath indexes supported since 2.6.3/2.7.2/2.8.1" @@ -1801,7 +1798,7 @@ pgroup.test_jsonpath_index_field_pagination_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('cars', nil, {first = 2}) @@ -1816,7 +1813,7 @@ pgroup.test_jsonpath_index_field_pagination_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local after = ... local result, err = foo:select('cars', nil, {first = 2, after = after}) @@ -1834,7 +1831,7 @@ pgroup.test_jsonpath_index_field_pagination_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local after = ... local result, err = foo:select('cars', nil, {first = -2, after = after}) @@ -1851,7 +1848,7 @@ pgroup.test_jsonpath_index_field_pagination_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('cars', {{'==', 'data_index', 'Yellow'}}, {first = 2}) @@ -1864,7 +1861,7 @@ pgroup.test_jsonpath_index_field_pagination_readview = function(g) t.assert_equals(objects, helpers.get_objects_by_idxs(cars, {1, 2})) end -pgroup.test_select_timeout_readview = function(g) +pgroup.test_select_timeout = function(g) local customers = helpers.insert_objects(g, 'customers', { { id = 1, name = "Elizabeth", last_name = "Jackson", @@ -1886,7 +1883,7 @@ pgroup.test_select_timeout_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', nil, {timeout = 1, fullscan = true}) @@ -1905,7 +1902,7 @@ end -- gh-220: bucket_id argument is ignored when it cannot be deduced -- from provided select/pairs conditions. -pgroup.test_select_no_map_reduce_readview = function(g) +pgroup.test_select_no_map_reduce = function(g) local customers = helpers.insert_objects(g, 'customers', { { -- bucket_id is 477, storage is s-2 @@ -1935,7 +1932,7 @@ pgroup.test_select_no_map_reduce_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', nil, {bucket_id = 2804, timeout = 1, fullscan = true}) @@ -1956,7 +1953,7 @@ pgroup.test_select_no_map_reduce_readview = function(g) local result, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select( 'customers', {{'==', 'age', 81}}, {bucket_id = 1161, timeout = 1}) @@ -1973,11 +1970,11 @@ pgroup.test_select_no_map_reduce_readview = function(g) t.assert_equals(diff_2, 0, 'Select request was not a map reduce') end -pgroup.test_select_yield_every_0_readview = function(g) +pgroup.test_select_yield_every_0 = function(g) local resp, err = g.cluster.main_server.net_box:eval([[ local crud = require('crud') - foo, err = crud.readview('foo') + local foo, err = crud.readview('foo') local result, err = foo:select('customers', nil, { yield_every = 0, fullscan = true })