box: hide EE configuration options
Currently, all the EE configuration options are visible in CE, but an attempt to set them either fails or ignored. Let's be consistent and simply hide those options from CE, like we do with the feedback daemon. The only problem here is that some tests print the whole config to the result file: box/cfg, box/admin, app-tap/init_script. We fixed box/cfg and box/admin tests by adding EE keys to the cfg_filter if tests are run by a EE binary. This should make the output the same between CE and EE. As for app-tap/init_script, since it doesn't use cfg_filter, we removed printing of the whole config to the result file and instead print just box.cfg.memtx_memory - it should be enough to check that box.cfg is accessible from an init script. Note, we use explicit 'if' statement in ifdef_XXX functions rather than 'a and b or c', because the latter doesn't work as expected if 'b' is boolean false. While we are at it, make cfg_getb helper return a boolean value instead of integer, and false instead of -1 in case of nil. (I've no idea why it was made to return -1 in case of nil in the first place.) NO_DOC=undocumented NO_CHANGELOG=undocumented
Showing
- src/box/CMakeLists.txt 0 additions, 2 deletionssrc/box/CMakeLists.txt
- src/box/audit.c 0 additions, 24 deletionssrc/box/audit.c
- src/box/audit.h 12 additions, 2 deletionssrc/box/audit.h
- src/box/flightrec.h 3 additions, 3 deletionssrc/box/flightrec.h
- src/box/lua/load_cfg.lua 65 additions, 49 deletionssrc/box/lua/load_cfg.lua
- src/box/wal_ext.h 0 additions, 1 deletionsrc/box/wal_ext.h
- src/cfg.c 2 additions, 5 deletionssrc/cfg.c
- src/cfg.h 2 additions, 2 deletionssrc/cfg.h
- test/app-tap/init_script.result 1 addition, 78 deletionstest/app-tap/init_script.result
- test/app-tap/init_script.test.lua 1 addition, 12 deletionstest/app-tap/init_script.test.lua
- test/box-luatest/error_on_dynamic_cfg_in_load_cfg_test.lua 0 additions, 22 deletionstest/box-luatest/error_on_dynamic_cfg_in_load_cfg_test.lua
- test/box-luatest/wal_ext_test.lua 0 additions, 20 deletionstest/box-luatest/wal_ext_test.lua
- test/box/admin.result 1 addition, 25 deletionstest/box/admin.result
- test/box/box.lua 26 additions, 1 deletiontest/box/box.lua
- test/box/cfg.result 2 additions, 50 deletionstest/box/cfg.result
Loading
Please register or sign in to comment