Skip to content
Snippets Groups Projects
Commit 0a55a3ea authored by Roman Tokarev's avatar Roman Tokarev
Browse files

[box] add tests for config reloading

parent 7f3ac2e6
No related merge requests found
reload configuration
fail
Could not accept read only 'slab_alloc_arena' option
Could not accept read only 'pid_file' option
Could not accept read only 'primary_port' option
Could not accept read only 'secondary_port' option
Could not accept read only 'admin_port' option
Could not accept read only 'rows_per_wal' option
Could not accept read only 'namespace[0].enabled' option
Could not accept read only 'namespace[0].index[0].type' option
Could not accept read only 'namespace[0].index[0].unique' option
Could not accept read only 'namespace[0].index[0].key_field[0].fieldno' option
Could not accept read only 'namespace[0].index[0].key_field[0].type' option
---
reload configuration
fail
Option 'namespace[0].enabled' is not set (or has a default value)
---
reload configuration
ok
# encoding: tarantool
#
os.rename("var/tarantool.cfg", "var/tarantool.cfg.old")
os.symlink("../box/tarantool_bad1.cfg", "var/tarantool.cfg")
exec admin "reload configuration"
os.unlink("var/tarantool.cfg")
os.symlink("../box/tarantool_bad2.cfg", "var/tarantool.cfg")
exec admin "reload configuration"
os.unlink("var/tarantool.cfg")
os.symlink("../box/tarantool_good.cfg", "var/tarantool.cfg")
exec admin "reload configuration"
os.unlink("var/tarantool.cfg")
os.rename("var/tarantool.cfg.old", "var/tarantool.cfg")
# vim: syntax=python
slab_alloc_arena = 0.2
pid_file = "/var/run/box.pid"
primary_port = 33023
secondary_port = 33024
admin_port = 33025
rows_per_wal = 500
namespace[0].enabled = 0
namespace[0].index[0].type = "TREE"
namespace[0].index[0].unique = 0
namespace[0].index[0].key_field[0].fieldno = 1
namespace[0].index[0].key_field[0].type = "STR"
slab_alloc_arena = 0.1
pid_file = "box.pid"
primary_port = 33013
secondary_port = 33014
admin_port = 33015
rows_per_wal = 50
#namespace[0].enabled = 1
namespace[0].index[0].type = "HASH"
namespace[0].index[0].unique = 1
namespace[0].index[0].key_field[0].fieldno = 0
namespace[0].index[0].key_field[0].type = "NUM"
slab_alloc_arena = 0.1
pid_file = "box.pid"
primary_port = 33013
secondary_port = 33014
admin_port = 33015
rows_per_wal = 50
namespace[0].enabled = 1
namespace[0].index[0].type = "HASH"
namespace[0].index[0].unique = 1
namespace[0].index[0].key_field[0].fieldno = 0
namespace[0].index[0].key_field[0].type = "NUM"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment