Skip to content
Snippets Groups Projects
Commit 8ebd9090 authored by Dmitry Simonenko's avatar Dmitry Simonenko
Browse files

lua-plus-dict: convert admin tests to the new lua console

and the new data dictionary
parent 95f9e77e
No related merge requests found
......@@ -60,7 +60,8 @@ static int
lbox_save_coredump(struct lua_State *L __attribute__((unused)))
{
coredump(60);
return 0;
lua_pushstring(L, "ok");
return 1;
}
static int
......
exit
show stat
box.insert(box.schema.SPACE_ID, 0, 0, 'tweedledum')
---
statistics:
REPLACE: { rps: 0 , total: 0 }
SELECT: { rps: 0 , total: 0 }
UPDATE: { rps: 0 , total: 0 }
DELETE_1_3: { rps: 0 , total: 0 }
DELETE: { rps: 0 , total: 0 }
CALL: { rps: 0 , total: 0 }
- [0, 0, 'tweedledum']
...
help
box.insert(box.schema.INDEX_ID, 0, 0, 'primary', 'hash', 1, 1, 0, 'num')
---
available commands:
- help
- exit
- show info
- show fiber
- show configuration
- show slab
- show palloc
- show stat
- show plugins
- save coredump
- save snapshot
- lua command
- reload configuration
- show injections (debug mode only)
- set injection <name> <state> (debug mode only)
- [0, 0, 'primary', 1752392040, 1, 1, 0, 'num']
...
show configuration
box.stat()
---
configuration:
username: (null)
local_hot_standby: "false"
bind_ipaddr: "INADDR_ANY"
coredump: "false"
admin_port: "33015"
replication_port: "0"
log_level: "4"
slab_alloc_arena: "0.1"
slab_alloc_minimal: "64"
slab_alloc_factor: "2"
work_dir: (null)
snap_dir: "."
wal_dir: "."
script_dir: "."
pid_file: "box.pid"
logger: "cat - >> tarantool.log"
logger_nonblock: "true"
io_collect_interval: "0"
backlog: "1024"
readahead: "16320"
snap_io_rate_limit: "0"
rows_per_wal: "50"
wal_writer_inbox_size: "16384"
wal_mode: "fsync_delay"
wal_fsync_delay: "0"
wal_dir_rescan_delay: "0.1"
panic_on_snap_error: "true"
panic_on_wal_error: "false"
primary_port: "33013"
secondary_port: "33014"
too_long_threshold: "0.5"
custom_proc_title: (null)
memcached_port: "0"
memcached_space: "23"
memcached_expire: "false"
memcached_expire_per_loop: "1024"
memcached_expire_full_sweep: "3600"
replication_source: (null)
space[0].enabled: "true"
space[0].arity: "-1"
space[0].estimated_rows: "0"
space[0].index[0].type: "HASH"
space[0].index[0].unique: "true"
space[0].index[0].key_field[0].fieldno: "0"
space[0].index[0].key_field[0].type: "NUM"
- DELETE:
total: 0
rps: 0
SELECT:
total: 0
rps: 0
REPLACE:
total: 2
rps: 0
CALL:
total: 0
rps: 0
UPDATE:
total: 0
rps: 0
DELETE_1_3:
total: 0
rps: 0
...
show stat
help()
---
statistics:
REPLACE: { rps: 0 , total: 0 }
SELECT: { rps: 0 , total: 0 }
UPDATE: { rps: 0 , total: 0 }
DELETE_1_3: { rps: 0 , total: 0 }
DELETE: { rps: 0 , total: 0 }
CALL: { rps: 0 , total: 0 }
- server admin commands
- - box.snapshot()
- box.info()
- box.stat()
- box.slab.info()
- box.slab.check()
- box.fiber.info()
- box.plugin.info()
- box.cfg()
- box.cfg_reload()
- box.coredump()
...
box.cfg()
---
- io_collect_interval: 0
pid_file: box.pid
slab_alloc_minimal: 64
slab_alloc_arena: 0.1
log_level: 4
logger_nonblock: true
memcached_expire_per_loop: 1024
snap_dir: .
coredump: false
panic_on_snap_error: true
memcached_expire_full_sweep: 3600
replication_port: 0
wal_fsync_delay: 0
too_long_threshold: 0.5
slab_alloc_factor: 2
admin_port: 33015
logger: cat - >> tarantool.log
snap_io_rate_limit: 0
wal_dir_rescan_delay: 0.1
backlog: 1024
secondary_port: 33014
wal_dir: .
local_hot_standby: false
wal_mode: fsync_delay
rows_per_wal: 50
readahead: 16320
panic_on_wal_error: false
script_dir: .
primary_port: 33013
bind_ipaddr: INADDR_ANY
memcached_port: 0
memcached_space: 23
memcached_expire: false
...
box.stat()
---
- DELETE:
total: 0
rps: 0
SELECT:
total: 0
rps: 0
REPLACE:
total: 2
rps: 0
CALL:
total: 0
rps: 0
UPDATE:
total: 0
rps: 0
DELETE_1_3:
total: 0
rps: 0
...
insert into t0 values (1, 'tuple')
Insert OK, 1 row affected
save snapshot
box.snapshot()
---
ok
- ok
...
delete from t0 where k0 = 1
Delete OK, 1 row affected
show info
box.info()
---
info:
version: "1.minor.patch-<rev>-<commit>"
uptime: <uptime>
- version: 1.minor.patch-<rev>-<commit>
status: primary
pid: <pid>
logger_pid: <pid>
lsn: 5
snapshot_pid: <pid>
lsn: 3
recovery_lag: 0.000
recovery_last_update: 0.000
status: primary
config: "tarantool.cfg"
recovery_last_update: 0
recovery_lag: 0
uptime: <uptime>
build:
flags: ' -fno-omit-frame-pointer -fno-stack-protector -fexceptions -funwind-tables
-std=c11 -Wall -Wextra -Wno-sign-compare -Wno-strict-aliasing -Werror -pthread'
target: Linux-i686-Debug
compiler: /usr/bin/gcc /usr/bin/c++
options: cmake . -DCMAKE_INSTALL_PREFIX=/usr/local -DENABLE_STATIC=OFF -DENABLE_TRACE=ON
-DENABLE_BACKTRACE=ON -DENABLE_CLIENT=ON
logger_pid: <pid>
config: tarantool.cfg
...
# encoding: utf-8
#
import sys
# clear statistics:
server.stop()
server.deploy()
admin("exit")
admin("show stat")
admin("help")
admin("show configuration")
admin("show stat")
admin("box.insert(box.schema.SPACE_ID, 0, 0, 'tweedledum')")
admin("box.insert(box.schema.INDEX_ID, 0, 0, 'primary', 'hash', 1, 1, 0, 'num')")
admin("box.stat()")
admin("help()")
admin("box.cfg()")
admin("box.stat()")
sql("insert into t0 values (1, 'tuple')")
admin("save snapshot")
admin("box.snapshot()")
sql("delete from t0 where k0 = 1")
sys.stdout.push_filter("(\d)\.\d\.\d(-\d+-\w+)?", "\\1.minor.patch-<rev>-<commit>")
sys.stdout.push_filter("pid: \d+", "pid: <pid>")
......@@ -18,14 +22,14 @@ sys.stdout.push_filter("logger_pid: \d+", "pid: <pid>")
sys.stdout.push_filter("uptime: \d+", "uptime: <uptime>")
sys.stdout.push_filter("uptime: \d+", "uptime: <uptime>")
sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool")
admin("show info")
admin("box.info()")
sys.stdout.clear_all_filters()
sys.stdout.push_filter(".*", "")
admin("show fiber")
admin("show slab")
admin("show palloc")
admin("box.fiber.info()")
admin("box.slab.info()")
sys.stdout.clear_all_filters()
admin("box.space[0]:drop()")
# vim: syntax=python
-- moved to separate test because this test fail in the valgrind mode (coredump
-- process terminated via abort procedure)
save coredump
box.coredump()
---
ok
- ok
...
-- vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 syntax=lua
-- moved to separate test because this test fail in the valgrind mode (coredump
-- process terminated via abort procedure)
save coredump
box.coredump()
-- vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 syntax=lua
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