Branch: refs/heads/feature-script_dir
Home: https://github.com/mailru/tarantool
Commit: ec89190fc7cf9b2ea5cf974248f0a327624844f7
https://github.com/mailru/tarantool/commit/ec89190fc7cf9b2ea5cf974248f0a327624844f7
Author: Dmitry Simonenko <[email protected]>
Date: 2012-05-04 (Fri, 04 May 2012)
Changed paths:
M test/box/configuration.test
M test/box/lua.result
A test/box/tarantool_scriptdir.cfg
M test/box_memcached/off.result
Log Message:
-----------
feature-script_dir: test case added for script_dir presence
diff --git a/test/box/configuration.test b/test/box/configuration.test
index b1a9ba6..2f3da60 100644
--- a/test/box/configuration.test
+++ b/test/box/configuration.test
@@ -3,6 +3,7 @@
import os
import sys
+import shutil
print """
# Bug #708685:
@@ -65,4 +66,14 @@ sys.stdout.pop_filter()
# restore default server
server.stop()
server.deploy(self.suite_ini["config"])
+
+script_dir_path = os.path.join(vardir, "script_dir")
+os.mkdir(script_dir_path)
+open(os.path.join(script_dir_path, "init.lua"), "w+").close()
+
+server.stop()
+server.deploy("box/tarantool_scriptdir.cfg")
+
+shutil.rmtree(script_dir_path, True)
+
# vim: syntax=python
diff --git a/test/box/lua.result b/test/box/lua.result
index fa860aa..56574fa 100644
Binary files a/test/box/lua.result and b/test/box/lua.result differ
diff --git a/test/box/tarantool_scriptdir.cfg b/test/box/tarantool_scriptdir.cfg
new file mode 100644
index 0000000..44405de
--- /dev/null
+++ b/test/box/tarantool_scriptdir.cfg
@@ -0,0 +1,49 @@
+#
+# Limit of memory used to store tuples to 100MB
+# (0.1 GB)
+# This effectively limits the memory, used by
+# Tarantool. However, index and connection memory
+# is stored outside the slab allocator, hence
+# the effective memory usage can be higher (sometimes
+# twice as high).
+#
+slab_alloc_arena = 0.1
+
+#
+# Store the pid in this file. Relative to
+# startup dir.
+#
+pid_file = "box.pid"
+
+#
+# Pipe the logs into the following process.
+#
+logger="cat - >> tarantool.log"
+
+#
+# Read only and read-write port.
+primary_port = 33013
+# Read-only port.
+secondary_port = 33014
+#
+# The port for administrative commands.
+#
+admin_port = 33015
+#
+# Each write ahead log contains this many rows.
+# When the limit is reached, Tarantool closes
+# the WAL and starts a new one.
+rows_per_wal = 50
+
+#
+# script directory (where init.lua is expected to be)
+script_dir = "script_dir"
+
+# Define a simple space with 1 HASH-based
+# primary key.
+space[0].enabled = 1
+space[0].index[0].type = "HASH"
+space[0].index[0].unique = 1
+space[0].index[0].key_field[0].fieldno = 0
+space[0].index[0].key_field[0].type = "NUM"
+
diff --git a/test/box_memcached/off.result b/test/box_memcached/off.result
index 09a66bf..b8237b3 100644
--- a/test/box_memcached/off.result
+++ b/test/box_memcached/off.result
@@ -19,6 +19,7 @@ configuration:
work_dir: (null)
snap_dir: "."
wal_dir: "."
+ script_dir: "."
pid_file: "box.pid"
logger: "cat - >> tarantool.log"
logger_nonblock: "true"
================================================================
_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help : https://help.launchpad.net/ListHelp