File: configuration.test

package info (click to toggle)
tarantool 1.5.2.20.g5f5d924-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,568 kB
  • ctags: 18,697
  • sloc: ansic: 109,092; sh: 21,312; cpp: 20,633; xml: 9,666; asm: 2,488; python: 2,195; java: 1,759; perl: 1,002; makefile: 679
file content (115 lines) | stat: -rw-r--r-- 3,130 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# encoding: tarantool
#

import os
import sys
import shutil

# mask BFD warnings: https://bugs.launchpad.net/tarantool/+bug/1018356
sys.stdout.push_filter("unable to read unknown load command 0x2\d+", "")

print """
# Bug #708685:
#  Addition of required configuration file options broke backward
#  compatibility
#  (https://bugs.launchpad.net/bugs/708685)
"""
# stop current server
server.stop()
# start server from config with holes in spaces
server.deploy("box/tarantool_bug708685.cfg")
# check connection
exec admin "show configuration"

print """
# Bug #884768:
#  Test representation of boolean values
#  (https://bugs.launchpad.net/bugs/884768)
"""
# stop current server
server.stop()
# start server from config with different boolean represenation
server.deploy("box/tarantool_bug884768.cfg")
# check values
exec admin "show configuration"

print """
# Bug #876541:
#  Test floating point values (wal_fsync_delay) with fractional part
#  (https://bugs.launchpad.net/bugs/876541)
"""
# stop current server
server.stop()
server.deploy("box/tarantool_bug876541.cfg")
# check values
exec admin "lua box.cfg.wal_fsync_delay"

print """
# Bug#928413 Lua malfunction on certain configuration
#  (https://bugs.launchpad.net/bugs/928413)
"""
# stop current server
server.stop()
server.deploy("box/tarantool_bug928413.cfg")
# check values
exec admin "lua box.cfg.wal_fsync_delay"
exec admin "lua box.space[0].enabled"
exec admin "reload configuration"

print """
# Bug#100 Segmentation fault if rows_per_wal = 1
#  (https://github.com/tarantool/tarantool/issues/100)
"""
# stop current server
server.stop()
sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool")
server.test_option("-c " + os.path.join(os.getcwd(), "box/tarantool_bug_gh100.cfg"))
sys.stdout.pop_filter()

print """
# Bug#99 Salloc initialization is not checked on startup
#  (https://github.com/tarantool/tarantool/issues/99)
"""
# stop current server
server.stop()
try:
    server.deploy("box/tarantool_bug_gh-99.cfg")
except OSError as e:
    print("ok")

print """
#  Test field type conflict in keys
"""
# stop current server
server.stop()
# start server with memcached space conflict
sys.stdout.push_filter("(/\S+)+/tarantool", "tarantool")
server.test_option("-c " + os.path.join(os.getcwd(), "box/tarantool_bad_type.cfg"))
sys.stdout.pop_filter()


script_dir_path = os.path.join(vardir, "script_dir")
os.mkdir(script_dir_path)
shutil.copy("box/test_init.lua", os.path.join(script_dir_path, "init.lua"))

server.stop()
server.deploy("box/tarantool_scriptdir.cfg")
exec admin "lua print_config()"

# Test script_dir + require
server.stop()
shutil.copy("box/require_init.lua", os.path.join(script_dir_path, "init.lua"))
shutil.copy("box/require_mod.lua", os.path.join(script_dir_path, "mod.lua"))
server.deploy("box/tarantool_scriptdir.cfg")
exec admin "lua string.gmatch(package_path, '([^;]*)')()"
exec admin "lua string.gmatch(package_cpath, '([^;]*)')()"
exec admin "lua mod.test(10, 15)"

# restore default server
server.stop()
shutil.rmtree(script_dir_path, True)
server.deploy(self.suite_ini["config"])

sys.stdout.pop_filter()

# vim: syntax=python