test: write bad snap with errinj in gh_7974_force_recovery_bugs_test
Corrupted snap files that are used in the test were generated manually using a now old Tarantool version that has an outdated system schema. In the scope of #7149 DDL was forbidden until the system schema is upgraded. The problem is luatest tries to grant super privileges to the guest user (which is a DDL operation) after starting a test instance unless they are already granted. Since the snap files don't store the required privileges, luatest fails. To fix this issue, let's generate corrupted snap files right in the test using error injection. Closes #8702 NO_DOC=test NO_CHANGELOG=test (cherry picked from commit 67598073)
Showing
- src/box/memtx_engine.cc 92 additions, 0 deletionssrc/box/memtx_engine.cc
- src/lib/core/errinj.h 6 additions, 0 deletionssrc/lib/core/errinj.h
- test/box-luatest/gh_7974_data/empty_snapshot/00000000000000000004.snap 0 additions, 0 deletions...est/gh_7974_data/empty_snapshot/00000000000000000004.snap
- test/box-luatest/gh_7974_data/first_corrupted_request/00000000000000000004.snap 0 additions, 0 deletions...74_data/first_corrupted_request/00000000000000000004.snap
- test/box-luatest/gh_7974_data/invalid_non_insert_request/00000000000000000001.snap 0 additions, 0 deletions...data/invalid_non_insert_request/00000000000000000001.snap
- test/box-luatest/gh_7974_data/invalid_user_space_request/00000000000000000004.snap 0 additions, 0 deletions...data/invalid_user_space_request/00000000000000000004.snap
- test/box-luatest/gh_7974_data/only_user_space_request/00000000000000000004.snap 0 additions, 0 deletions...74_data/only_user_space_request/00000000000000000004.snap
- test/box-luatest/gh_7974_data/second_corrupted_request/00000000000000000008.snap 0 additions, 0 deletions...4_data/second_corrupted_request/00000000000000000008.snap
- test/box-luatest/gh_7974_data/unknown_request_type/00000000000000000001.snap 0 additions, 0 deletions..._7974_data/unknown_request_type/00000000000000000001.snap
- test/box-luatest/gh_7974_force_recovery_bugs_test.lua 163 additions, 161 deletionstest/box-luatest/gh_7974_force_recovery_bugs_test.lua
- test/box/errinj.result 6 additions, 0 deletionstest/box/errinj.result
Loading
Please register or sign in to comment