@@ -1690,3 +1690,43 @@ pgroup.test_storage_nil_err_is_processed = function(g)
1690
1690
t .assert_str_contains (err .str , ' StorageError' , ' Storage error class is preserved' )
1691
1691
t .assert_str_contains (err .str , ' My storage error' , ' Storage error msg is preserved' )
1692
1692
end
1693
+
1694
+ pgroup .before_test (' test_storage_uninit_error_text' , function (g )
1695
+ helpers .call_on_storages (g .cluster , function (server )
1696
+ server .net_box :eval ([[
1697
+ local _crud = rawget(_G, '_crud')
1698
+ rawset(_G, '_real_crud_select', _crud.select_on_storage)
1699
+ _crud.select_on_storage = nil
1700
+ rawset(_G, '_real_crud_get', _crud.get_on_storage)
1701
+ _crud.get_on_storage = nil
1702
+ ]] )
1703
+ end )
1704
+ end )
1705
+
1706
+ pgroup .after_test (' test_storage_uninit_error_text' , function (g )
1707
+ helpers .call_on_storages (g .cluster , function (server )
1708
+ server .net_box :eval ([[
1709
+ local _crud = rawget(_G, '_crud')
1710
+ _crud.select_on_storage = rawget(_G, '_real_crud_select')
1711
+ rawset(_G, '_real_crud_select', nil)
1712
+ _crud.get_on_storage = rawget(_G, '_real_crud_get')
1713
+ rawset(_G, '_real_crud_get', nil)
1714
+ ]] )
1715
+ end )
1716
+ end )
1717
+
1718
+ pgroup .test_storage_uninit_error_text = function (g )
1719
+ local obj , err = g .cluster .main_server .net_box :call (' crud.select' , {
1720
+ ' customers' , {{' ==' , ' age' , 101 }}
1721
+ })
1722
+ t .assert_equals (obj , nil )
1723
+ t .assert_str_contains (err .str , ' SelectError' )
1724
+ t .assert_str_contains (err .str , ' NotInitialized' )
1725
+ t .assert_str_contains (err .str , " crud isn't initialized on replicaset" )
1726
+
1727
+ obj , err = g .cluster .main_server .net_box :call (' crud.get' , {' customers' , 1 })
1728
+ t .assert_equals (obj , nil )
1729
+ t .assert_str_contains (err .str , ' GetError' )
1730
+ t .assert_str_contains (err .str , ' NotInitialized' )
1731
+ t .assert_str_contains (err .str , " crud isn't initialized on replicaset" )
1732
+ end
0 commit comments