File: upgrade.test.lua

package info (click to toggle)
tarantool 1.7.2.385.g952d79e-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 21,556 kB
  • ctags: 28,405
  • sloc: ansic: 180,313; cpp: 26,044; sh: 15,513; python: 4,893; makefile: 1,412
file content (43 lines) | stat: -rw-r--r-- 835 bytes parent folder | download
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
test_run = require('test_run').new()

version = test_run:get_cfg('version')
work_dir = "xlog/upgrade/"..version

test_run:cmd('create server upgrade with script="xlog/upgrade.lua", workdir="'..work_dir..'"')
test_run:cmd("start server upgrade")

test_run:switch('upgrade')

test_run:cmd(string.format("push filter '%s' to '<server_uuid>'", box.info.cluster.uuid))

--
-- Upgrade
--

box.schema.upgrade()

--
-- Migrated data
--

box.space._schema:select()
box.space._space:select()
box.space._index:select()
box.space._user:select()
box.space._func:select()
box.space._priv:select()

box.space._vspace ~= nil
box.space._vindex ~= nil
box.space._vuser ~= nil
box.space._vpriv ~= nil

-- a test space
box.space.distro:select{}

test_run:cmd("clear filter")

test_run:switch('default')
test_run:cmd('stop server upgrade')

test_run = nil