From b3b8e519a7945f0ab9e08f29f0f7f8c43ec169a3 Mon Sep 17 00:00:00 2001
From: Konstantin Osipov <kostja@tarantool.org>
Date: Fri, 30 Aug 2013 02:10:59 +0400
Subject: [PATCH] Convert box/sql.test to the new data dictionary and new lua
 console.

---
 test/box/00000000000000000001.snap | Bin 15 -> 0 bytes
 test/box/sql.result                |  16 ++++++++++++----
 test/box/sql.test.py               |   6 ++++--
 3 files changed, 16 insertions(+), 6 deletions(-)
 delete mode 100644 test/box/00000000000000000001.snap

diff --git a/test/box/00000000000000000001.snap b/test/box/00000000000000000001.snap
deleted file mode 100644
index 8f8d8ac5b4c8634e2099b9d6671560db48518960..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 15
WcmWIca}3}z&@(jT;*wjvRsaASSp$~<

diff --git a/test/box/sql.result b/test/box/sql.result
index 128a69408d..95c433fe75 100644
--- a/test/box/sql.result
+++ b/test/box/sql.result
@@ -1,3 +1,11 @@
+box.insert(box.schema.SPACE_ID, 0, 0, 'tweedledum')
+---
+- [0, 0, 'tweedledum']
+...
+box.insert(box.schema.INDEX_ID, 0, 0, 'primary', 'hash', 1, 1, 0, 'num')
+---
+- [0, 0, 'primary', 1752392040, 1, 1, 0, 'num']
+...
 ping
 ok
 ---
@@ -15,9 +23,9 @@ No match
 select * from t0 where k0 = 1
 Found 1 tuple:
 [1, 'I am a tuple']
-save snapshot
+box.snapshot()
 ---
-ok
+- ok
 ...
 select * from t0 where k0 = 1
 Found 1 tuple:
@@ -96,7 +104,7 @@ select * from t65537 where k0 = 0
 An error occurred: ER_NO_SUCH_SPACE, 'Space 65537 does not exist'
 select * from t4294967295 where k0 = 0
 An error occurred: ER_NO_SUCH_SPACE, 'Space 4294967295 does not exist'
-box.space[0]:truncate()
+box.space[0]:drop()
 ---
 ...
 #
@@ -105,5 +113,5 @@ box.space[0]:truncate()
 
 show status
 ---
-unknown command. try typing help.
+- error: '[string "show status"]:1: ''='' expected near ''status'''
 ...
diff --git a/test/box/sql.test.py b/test/box/sql.test.py
index 81bc0ed151..309aa540b5 100644
--- a/test/box/sql.test.py
+++ b/test/box/sql.test.py
@@ -1,4 +1,6 @@
 # encoding: utf-8
+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')")
 sql("ping")
 # xxx: bug -- currently selects no rows
 sql("select * from t0")
@@ -10,7 +12,7 @@ sql("select * from t0 where k0 = 0")
 sql("select * from t0 where k0 = 2")
 server.restart()
 sql("select * from t0 where k0 = 1")
-admin("save snapshot")
+admin("box.snapshot()")
 sql("select * from t0 where k0 = 1")
 server.restart()
 sql("select * from t0 where k0 = 1")
@@ -57,7 +59,7 @@ print """#
 sql("select * from t1 where k0 = 0")
 sql("select * from t65537 where k0 = 0")
 sql("select * from t4294967295 where k0 = 0")
-admin("box.space[0]:truncate()")
+admin("box.space[0]:drop()")
 
 print """#
 # A test case for: http://bugs.launchpad.net/bugs/716683
-- 
GitLab