[patches] [PATCH vshard 1/2] test: move router and storage tests to separate directories
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Tue Feb 20 01:45:46 MSK 2018
Signed-off-by: Vladislav Shpilevoy <v.shpilevoy at tarantool.org>
---
test/failover/test.lua | 10 +++++++++-
test/{main => misc}/bad_uuid_1_a.lua | 0
test/{main => misc}/bad_uuid_1_b.lua | 0
test/{main => misc}/bad_uuid_2_a.lua | 0
test/{main => misc}/bad_uuid_2_a_repaired.lua | 0
test/{main => misc}/bad_uuid_2_b.lua | 0
test/{main => misc}/bad_uuid_config.lua | 0
test/{main => misc}/bad_uuid_router.lua | 0
test/{main => misc}/check_uuid_on_connect.result | 8 ++++----
test/{main => misc}/check_uuid_on_connect.test.lua | 8 ++++----
test/{main => misc}/master_switch.result | 4 ++--
test/{main => misc}/master_switch.test.lua | 4 ++--
test/{main => misc}/reconfigure.result | 8 ++++----
test/{main => misc}/reconfigure.test.lua | 8 ++++----
test/{main => misc}/router_1.lua | 0
test/{main => misc}/storage_1_a.lua | 0
test/{main => misc}/storage_1_b.lua | 0
test/{main => misc}/storage_2_a.lua | 0
test/{main => misc}/storage_2_b.lua | 0
test/{main => misc}/storage_3_a.lua | 0
test/{main => misc}/suite.ini | 3 +--
test/{main => misc}/test.lua | 0
test/rebalancer/test.lua | 10 +++++++++-
test/{main => router}/exponential_timeout.result | 6 +++---
test/{main => router}/exponential_timeout.test.lua | 6 +++---
test/{main => router}/reconnect_to_master.result | 6 +++---
test/{main => router}/reconnect_to_master.test.lua | 6 +++---
test/{main => router}/reroute_wrong_bucket.result | 6 +++---
test/{main => router}/reroute_wrong_bucket.test.lua | 6 +++---
test/{main => router}/retry_reads.result | 6 +++---
test/{main => router}/retry_reads.test.lua | 6 +++---
test/{main => router}/router.result | 6 +++---
test/{main => router}/router.test.lua | 6 +++---
test/router/router_1.lua | 1 +
test/router/storage_1_a.lua | 1 +
test/router/storage_1_b.lua | 1 +
test/router/storage_2_a.lua | 1 +
test/router/storage_2_b.lua | 1 +
test/router/suite.ini | 6 ++++++
test/router/test.lua | 9 +++++++++
test/{main => storage}/garbage_collector.result | 4 ++--
test/{main => storage}/garbage_collector.test.lua | 4 ++--
test/{main => storage}/read_only_slave.result | 4 ++--
test/{main => storage}/read_only_slave.test.lua | 4 ++--
test/{main => storage}/recovery.result | 4 ++--
test/{main => storage}/recovery.test.lua | 4 ++--
test/{main => storage}/recovery_errinj.result | 4 ++--
test/{main => storage}/recovery_errinj.test.lua | 4 ++--
test/{main => storage}/storage.result | 4 ++--
test/{main => storage}/storage.test.lua | 4 ++--
test/storage/storage_1_a.lua | 1 +
test/storage/storage_1_b.lua | 1 +
test/storage/storage_2_a.lua | 1 +
test/storage/storage_2_b.lua | 1 +
test/storage/suite.ini | 7 +++++++
test/storage/test.lua | 9 +++++++++
56 files changed, 129 insertions(+), 74 deletions(-)
mode change 120000 => 100644 test/failover/test.lua
rename test/{main => misc}/bad_uuid_1_a.lua (100%)
rename test/{main => misc}/bad_uuid_1_b.lua (100%)
rename test/{main => misc}/bad_uuid_2_a.lua (100%)
rename test/{main => misc}/bad_uuid_2_a_repaired.lua (100%)
rename test/{main => misc}/bad_uuid_2_b.lua (100%)
rename test/{main => misc}/bad_uuid_config.lua (100%)
rename test/{main => misc}/bad_uuid_router.lua (100%)
rename test/{main => misc}/check_uuid_on_connect.result (95%)
rename test/{main => misc}/check_uuid_on_connect.test.lua (93%)
rename test/{main => misc}/master_switch.result (95%)
rename test/{main => misc}/master_switch.test.lua (94%)
rename test/{main => misc}/reconfigure.result (96%)
rename test/{main => misc}/reconfigure.test.lua (95%)
rename test/{main => misc}/router_1.lua (100%)
rename test/{main => misc}/storage_1_a.lua (100%)
rename test/{main => misc}/storage_1_b.lua (100%)
rename test/{main => misc}/storage_2_a.lua (100%)
rename test/{main => misc}/storage_2_b.lua (100%)
rename test/{main => misc}/storage_3_a.lua (100%)
rename test/{main => misc}/suite.ini (66%)
rename test/{main => misc}/test.lua (100%)
mode change 120000 => 100644 test/rebalancer/test.lua
rename test/{main => router}/exponential_timeout.result (93%)
rename test/{main => router}/exponential_timeout.test.lua (89%)
rename test/{main => router}/reconnect_to_master.result (95%)
rename test/{main => router}/reconnect_to_master.test.lua (93%)
rename test/{main => router}/reroute_wrong_bucket.result (96%)
rename test/{main => router}/reroute_wrong_bucket.test.lua (95%)
rename test/{main => router}/retry_reads.result (93%)
rename test/{main => router}/retry_reads.test.lua (90%)
rename test/{main => router}/router.result (98%)
rename test/{main => router}/router.test.lua (98%)
create mode 120000 test/router/router_1.lua
create mode 120000 test/router/storage_1_a.lua
create mode 120000 test/router/storage_1_b.lua
create mode 120000 test/router/storage_2_a.lua
create mode 120000 test/router/storage_2_b.lua
create mode 100644 test/router/suite.ini
create mode 100644 test/router/test.lua
rename test/{main => storage}/garbage_collector.result (94%)
rename test/{main => storage}/garbage_collector.test.lua (93%)
rename test/{main => storage}/read_only_slave.result (96%)
rename test/{main => storage}/read_only_slave.test.lua (95%)
rename test/{main => storage}/recovery.result (97%)
rename test/{main => storage}/recovery.test.lua (96%)
rename test/{main => storage}/recovery_errinj.result (93%)
rename test/{main => storage}/recovery_errinj.test.lua (91%)
rename test/{main => storage}/storage.result (99%)
rename test/{main => storage}/storage.test.lua (98%)
create mode 120000 test/storage/storage_1_a.lua
create mode 120000 test/storage/storage_1_b.lua
create mode 120000 test/storage/storage_2_a.lua
create mode 120000 test/storage/storage_2_b.lua
create mode 100644 test/storage/suite.ini
create mode 100644 test/storage/test.lua
diff --git a/test/failover/test.lua b/test/failover/test.lua
deleted file mode 120000
index 7384f16..0000000
--- a/test/failover/test.lua
+++ /dev/null
@@ -1 +0,0 @@
-../main/test.lua
\ No newline at end of file
diff --git a/test/failover/test.lua b/test/failover/test.lua
new file mode 100644
index 0000000..cb7c1ee
--- /dev/null
+++ b/test/failover/test.lua
@@ -0,0 +1,9 @@
+#!/usr/bin/env tarantool
+
+require('strict').on()
+
+box.cfg{
+ listen = os.getenv("LISTEN"),
+}
+
+require('console').listen(os.getenv('ADMIN'))
diff --git a/test/main/bad_uuid_1_a.lua b/test/misc/bad_uuid_1_a.lua
similarity index 100%
rename from test/main/bad_uuid_1_a.lua
rename to test/misc/bad_uuid_1_a.lua
diff --git a/test/main/bad_uuid_1_b.lua b/test/misc/bad_uuid_1_b.lua
similarity index 100%
rename from test/main/bad_uuid_1_b.lua
rename to test/misc/bad_uuid_1_b.lua
diff --git a/test/main/bad_uuid_2_a.lua b/test/misc/bad_uuid_2_a.lua
similarity index 100%
rename from test/main/bad_uuid_2_a.lua
rename to test/misc/bad_uuid_2_a.lua
diff --git a/test/main/bad_uuid_2_a_repaired.lua b/test/misc/bad_uuid_2_a_repaired.lua
similarity index 100%
rename from test/main/bad_uuid_2_a_repaired.lua
rename to test/misc/bad_uuid_2_a_repaired.lua
diff --git a/test/main/bad_uuid_2_b.lua b/test/misc/bad_uuid_2_b.lua
similarity index 100%
rename from test/main/bad_uuid_2_b.lua
rename to test/misc/bad_uuid_2_b.lua
diff --git a/test/main/bad_uuid_config.lua b/test/misc/bad_uuid_config.lua
similarity index 100%
rename from test/main/bad_uuid_config.lua
rename to test/misc/bad_uuid_config.lua
diff --git a/test/main/bad_uuid_router.lua b/test/misc/bad_uuid_router.lua
similarity index 100%
rename from test/main/bad_uuid_router.lua
rename to test/misc/bad_uuid_router.lua
diff --git a/test/main/check_uuid_on_connect.result b/test/misc/check_uuid_on_connect.result
similarity index 95%
rename from test/main/check_uuid_on_connect.result
rename to test/misc/check_uuid_on_connect.result
index 1d69cd7..d54c367 100644
--- a/test/main/check_uuid_on_connect.result
+++ b/test/misc/check_uuid_on_connect.result
@@ -14,10 +14,10 @@ REPLICASET_1 = { 'bad_uuid_1_a', 'bad_uuid_1_b' }
REPLICASET_2 = { 'bad_uuid_2_a', 'bad_uuid_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'misc')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'misc')
---
...
util = require('util')
@@ -67,7 +67,7 @@ box.space._bucket:replace{1, vshard.consts.BUCKET.ACTIVE}
---
- [1, 'active']
...
-test_run:cmd('create server bad_uuid_router with script="main/bad_uuid_router.lua", wait=True, wait_load=True')
+test_run:cmd('create server bad_uuid_router with script="misc/bad_uuid_router.lua", wait=True, wait_load=True')
---
- true
...
@@ -101,7 +101,7 @@ test_run:drop_cluster(REPLICASET_2)
REPLICASET_2 = { 'bad_uuid_2_a_repaired', 'bad_uuid_2_b' }
---
...
-test_run:cmd('create server bad_uuid_2_a_repaired with script="main/bad_uuid_2_a_repaired.lua", wait=False, wait_load=False')
+test_run:cmd('create server bad_uuid_2_a_repaired with script="misc/bad_uuid_2_a_repaired.lua", wait=False, wait_load=False')
---
- true
...
diff --git a/test/main/check_uuid_on_connect.test.lua b/test/misc/check_uuid_on_connect.test.lua
similarity index 93%
rename from test/main/check_uuid_on_connect.test.lua
rename to test/misc/check_uuid_on_connect.test.lua
index 7883bd7..f7af691 100644
--- a/test/main/check_uuid_on_connect.test.lua
+++ b/test/misc/check_uuid_on_connect.test.lua
@@ -5,8 +5,8 @@ test_run:cmd("push filter 'line: *[0-9]+' to 'line: <line>'")
REPLICASET_1 = { 'bad_uuid_1_a', 'bad_uuid_1_b' }
REPLICASET_2 = { 'bad_uuid_2_a', 'bad_uuid_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'misc')
+test_run:create_cluster(REPLICASET_2, 'misc')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'bad_uuid_1_a')
util.wait_master(test_run, REPLICASET_2, 'bad_uuid_2_a')
@@ -24,7 +24,7 @@ box.space._bucket:select{}
-- connection was lost. Restore it to 'active' manualy.
box.space._bucket:replace{1, vshard.consts.BUCKET.ACTIVE}
-test_run:cmd('create server bad_uuid_router with script="main/bad_uuid_router.lua", wait=True, wait_load=True')
+test_run:cmd('create server bad_uuid_router with script="misc/bad_uuid_router.lua", wait=True, wait_load=True')
test_run:cmd('start server bad_uuid_router')
test_run:switch('bad_uuid_router')
fiber = require('fiber')
@@ -40,7 +40,7 @@ while test_run:grep_log('bad_uuid_router', 'Mismatch server UUID on replica bad_
test_run:cmd("switch default")
test_run:drop_cluster(REPLICASET_2)
REPLICASET_2 = { 'bad_uuid_2_a_repaired', 'bad_uuid_2_b' }
-test_run:cmd('create server bad_uuid_2_a_repaired with script="main/bad_uuid_2_a_repaired.lua", wait=False, wait_load=False')
+test_run:cmd('create server bad_uuid_2_a_repaired with script="misc/bad_uuid_2_a_repaired.lua", wait=False, wait_load=False')
test_run:cmd('start server bad_uuid_2_a_repaired')
test_run:cmd('start server bad_uuid_2_b')
util.wait_master(test_run, REPLICASET_2, 'bad_uuid_2_a_repaired')
diff --git a/test/main/master_switch.result b/test/misc/master_switch.result
similarity index 95%
rename from test/main/master_switch.result
rename to test/misc/master_switch.result
index abcb215..3e42c2d 100644
--- a/test/main/master_switch.result
+++ b/test/misc/master_switch.result
@@ -7,10 +7,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'misc')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'misc')
---
...
util = require('util')
diff --git a/test/main/master_switch.test.lua b/test/misc/master_switch.test.lua
similarity index 94%
rename from test/main/master_switch.test.lua
rename to test/misc/master_switch.test.lua
index 2e33163..f5ad002 100644
--- a/test/main/master_switch.test.lua
+++ b/test/misc/master_switch.test.lua
@@ -3,8 +3,8 @@ test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'misc')
+test_run:create_cluster(REPLICASET_2, 'misc')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
diff --git a/test/main/reconfigure.result b/test/misc/reconfigure.result
similarity index 96%
rename from test/main/reconfigure.result
rename to test/misc/reconfigure.result
index 145cee6..f873299 100644
--- a/test/main/reconfigure.result
+++ b/test/misc/reconfigure.result
@@ -11,10 +11,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'misc')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'misc')
---
...
util = require('util')
@@ -26,7 +26,7 @@ util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
---
...
-test_run:cmd('create server router_1 with script="main/router_1.lua", wait=True, wait_load=True')
+test_run:cmd('create server router_1 with script="misc/router_1.lua", wait=True, wait_load=True')
---
- true
...
@@ -77,7 +77,7 @@ cfg.sharding[rs3_id] = {replicas = {[s3_1_id] = {uri = "storage:storage at 127.0.0.
REPLICASET_3 = {'storage_3_a'}
---
...
-test_run:create_cluster(REPLICASET_3, 'main')
+test_run:create_cluster(REPLICASET_3, 'misc')
---
...
-- test for unknown uuid
diff --git a/test/main/reconfigure.test.lua b/test/misc/reconfigure.test.lua
similarity index 95%
rename from test/main/reconfigure.test.lua
rename to test/misc/reconfigure.test.lua
index 077754b..65e7cef 100644
--- a/test/main/reconfigure.test.lua
+++ b/test/misc/reconfigure.test.lua
@@ -4,13 +4,13 @@ test_run:cmd("push filter '.*/init.lua.*[0-9]+: ' to ''")
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'misc')
+test_run:create_cluster(REPLICASET_2, 'misc')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
-test_run:cmd('create server router_1 with script="main/router_1.lua", wait=True, wait_load=True')
+test_run:cmd('create server router_1 with script="misc/router_1.lua", wait=True, wait_load=True')
test_run:cmd('start server router_1')
test_run:switch('default')
@@ -29,7 +29,7 @@ cfg.sharding[rs2_id].replicas[s2_2_id].master = true
cfg.sharding[rs3_id] = {replicas = {[s3_1_id] = {uri = "storage:storage at 127.0.0.1:3306", name = 'storage_3_a', master = true}}}
REPLICASET_3 = {'storage_3_a'}
-test_run:create_cluster(REPLICASET_3, 'main')
+test_run:create_cluster(REPLICASET_3, 'misc')
-- test for unknown uuid
test_run:cmd('switch storage_1_a')
diff --git a/test/main/router_1.lua b/test/misc/router_1.lua
similarity index 100%
rename from test/main/router_1.lua
rename to test/misc/router_1.lua
diff --git a/test/main/storage_1_a.lua b/test/misc/storage_1_a.lua
similarity index 100%
rename from test/main/storage_1_a.lua
rename to test/misc/storage_1_a.lua
diff --git a/test/main/storage_1_b.lua b/test/misc/storage_1_b.lua
similarity index 100%
rename from test/main/storage_1_b.lua
rename to test/misc/storage_1_b.lua
diff --git a/test/main/storage_2_a.lua b/test/misc/storage_2_a.lua
similarity index 100%
rename from test/main/storage_2_a.lua
rename to test/misc/storage_2_a.lua
diff --git a/test/main/storage_2_b.lua b/test/misc/storage_2_b.lua
similarity index 100%
rename from test/main/storage_2_b.lua
rename to test/misc/storage_2_b.lua
diff --git a/test/main/storage_3_a.lua b/test/misc/storage_3_a.lua
similarity index 100%
rename from test/main/storage_3_a.lua
rename to test/misc/storage_3_a.lua
diff --git a/test/main/suite.ini b/test/misc/suite.ini
similarity index 66%
rename from test/main/suite.ini
rename to test/misc/suite.ini
index 510e467..6532b92 100644
--- a/test/main/suite.ini
+++ b/test/misc/suite.ini
@@ -1,7 +1,6 @@
[default]
core = tarantool
-description = Storage tests
+description = Misc tests
script = test.lua
is_parallel = False
-release_disabled = recovery_errinj.test.lua
lua_libs = ../lua_libs/util.lua bad_uuid_config.lua ../../example/localcfg.lua
diff --git a/test/main/test.lua b/test/misc/test.lua
similarity index 100%
rename from test/main/test.lua
rename to test/misc/test.lua
diff --git a/test/rebalancer/test.lua b/test/rebalancer/test.lua
deleted file mode 120000
index 7384f16..0000000
--- a/test/rebalancer/test.lua
+++ /dev/null
@@ -1 +0,0 @@
-../main/test.lua
\ No newline at end of file
diff --git a/test/rebalancer/test.lua b/test/rebalancer/test.lua
new file mode 100644
index 0000000..cb7c1ee
--- /dev/null
+++ b/test/rebalancer/test.lua
@@ -0,0 +1,9 @@
+#!/usr/bin/env tarantool
+
+require('strict').on()
+
+box.cfg{
+ listen = os.getenv("LISTEN"),
+}
+
+require('console').listen(os.getenv('ADMIN'))
diff --git a/test/main/exponential_timeout.result b/test/router/exponential_timeout.result
similarity index 93%
rename from test/main/exponential_timeout.result
rename to test/router/exponential_timeout.result
index f234a78..fb54d0f 100644
--- a/test/main/exponential_timeout.result
+++ b/test/router/exponential_timeout.result
@@ -7,10 +7,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'router')
---
...
util = require('util')
@@ -22,7 +22,7 @@ util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
---
...
-test_run:cmd("create server router_1 with script='main/router_1.lua'")
+test_run:cmd("create server router_1 with script='router/router_1.lua'")
---
- true
...
diff --git a/test/main/exponential_timeout.test.lua b/test/router/exponential_timeout.test.lua
similarity index 89%
rename from test/main/exponential_timeout.test.lua
rename to test/router/exponential_timeout.test.lua
index b017001..3ec0b8c 100644
--- a/test/main/exponential_timeout.test.lua
+++ b/test/router/exponential_timeout.test.lua
@@ -3,12 +3,12 @@ test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
+test_run:create_cluster(REPLICASET_2, 'router')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
-test_run:cmd("create server router_1 with script='main/router_1.lua'")
+test_run:cmd("create server router_1 with script='router/router_1.lua'")
test_run:cmd("start server router_1")
test_run:cmd('switch router_1')
util = require('util')
diff --git a/test/main/reconnect_to_master.result b/test/router/reconnect_to_master.result
similarity index 95%
rename from test/main/reconnect_to_master.result
rename to test/router/reconnect_to_master.result
index 2ab4d24..a24ec9b 100644
--- a/test/main/reconnect_to_master.result
+++ b/test/router/reconnect_to_master.result
@@ -17,10 +17,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'router')
---
...
util = require('util')
@@ -61,7 +61,7 @@ fiber = require('fiber')
while _bucket:count() ~= 10 do fiber.sleep(0.1) end
---
...
-test_run:cmd("create server router_1 with script='main/router_1.lua'")
+test_run:cmd("create server router_1 with script='router/router_1.lua'")
---
- true
...
diff --git a/test/main/reconnect_to_master.test.lua b/test/router/reconnect_to_master.test.lua
similarity index 93%
rename from test/main/reconnect_to_master.test.lua
rename to test/router/reconnect_to_master.test.lua
index bc8fa39..39ba90e 100644
--- a/test/main/reconnect_to_master.test.lua
+++ b/test/router/reconnect_to_master.test.lua
@@ -6,8 +6,8 @@ fiber = require('fiber')
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
+test_run:create_cluster(REPLICASET_2, 'router')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
@@ -26,7 +26,7 @@ _bucket = box.space._bucket
fiber = require('fiber')
while _bucket:count() ~= 10 do fiber.sleep(0.1) end
-test_run:cmd("create server router_1 with script='main/router_1.lua'")
+test_run:cmd("create server router_1 with script='router/router_1.lua'")
test_run:cmd("start server router_1")
-- Break a connection to a master.
diff --git a/test/main/reroute_wrong_bucket.result b/test/router/reroute_wrong_bucket.result
similarity index 96%
rename from test/main/reroute_wrong_bucket.result
rename to test/router/reroute_wrong_bucket.result
index da82fa9..eda3bab 100644
--- a/test/main/reroute_wrong_bucket.result
+++ b/test/router/reroute_wrong_bucket.result
@@ -7,10 +7,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'router')
---
...
util = require('util')
@@ -22,7 +22,7 @@ util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
---
...
-test_run:cmd('create server router_1 with script="main/router_1.lua"')
+test_run:cmd('create server router_1 with script="router/router_1.lua"')
---
- true
...
diff --git a/test/main/reroute_wrong_bucket.test.lua b/test/router/reroute_wrong_bucket.test.lua
similarity index 95%
rename from test/main/reroute_wrong_bucket.test.lua
rename to test/router/reroute_wrong_bucket.test.lua
index 122d06f..6febd24 100644
--- a/test/main/reroute_wrong_bucket.test.lua
+++ b/test/router/reroute_wrong_bucket.test.lua
@@ -2,13 +2,13 @@ test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
+test_run:create_cluster(REPLICASET_2, 'router')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
-test_run:cmd('create server router_1 with script="main/router_1.lua"')
+test_run:cmd('create server router_1 with script="router/router_1.lua"')
test_run:cmd('start server router_1')
test_run:switch('storage_1_a')
vshard.storage.rebalancer_disable()
diff --git a/test/main/retry_reads.result b/test/router/retry_reads.result
similarity index 93%
rename from test/main/retry_reads.result
rename to test/router/retry_reads.result
index 62d09af..64b0ff3 100644
--- a/test/main/retry_reads.result
+++ b/test/router/retry_reads.result
@@ -7,10 +7,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'router')
---
...
util = require('util')
@@ -22,7 +22,7 @@ util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
---
...
-test_run:cmd("create server router_1 with script='main/router_1.lua'")
+test_run:cmd("create server router_1 with script='router/router_1.lua'")
---
- true
...
diff --git a/test/main/retry_reads.test.lua b/test/router/retry_reads.test.lua
similarity index 90%
rename from test/main/retry_reads.test.lua
rename to test/router/retry_reads.test.lua
index da1739e..2fb2fc7 100644
--- a/test/main/retry_reads.test.lua
+++ b/test/router/retry_reads.test.lua
@@ -3,12 +3,12 @@ test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
+test_run:create_cluster(REPLICASET_2, 'router')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
-test_run:cmd("create server router_1 with script='main/router_1.lua'")
+test_run:cmd("create server router_1 with script='router/router_1.lua'")
test_run:cmd("start server router_1")
test_run:cmd('switch router_1')
util = require('util')
diff --git a/test/main/router.result b/test/router/router.result
similarity index 98%
rename from test/main/router.result
rename to test/router/router.result
index 3646356..fcf451f 100644
--- a/test/main/router.result
+++ b/test/router/router.result
@@ -17,10 +17,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'router')
---
...
util = require('util')
@@ -32,7 +32,7 @@ util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
---
...
-test_run:cmd("create server router_1 with script='main/router_1.lua'")
+test_run:cmd("create server router_1 with script='router/router_1.lua'")
---
- true
...
diff --git a/test/main/router.test.lua b/test/router/router.test.lua
similarity index 98%
rename from test/main/router.test.lua
rename to test/router/router.test.lua
index 5c8ba2b..aedb015 100644
--- a/test/main/router.test.lua
+++ b/test/router/router.test.lua
@@ -6,12 +6,12 @@ fiber = require('fiber')
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'router')
+test_run:create_cluster(REPLICASET_2, 'router')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
-test_run:cmd("create server router_1 with script='main/router_1.lua'")
+test_run:cmd("create server router_1 with script='router/router_1.lua'")
test_run:cmd("start server router_1")
replicaset1_uuid = test_run:eval('storage_1_a', 'box.info.cluster.uuid')[1]
diff --git a/test/router/router_1.lua b/test/router/router_1.lua
new file mode 120000
index 0000000..da63b08
--- /dev/null
+++ b/test/router/router_1.lua
@@ -0,0 +1 @@
+../../example/router_1.lua
\ No newline at end of file
diff --git a/test/router/storage_1_a.lua b/test/router/storage_1_a.lua
new file mode 120000
index 0000000..1f1d355
--- /dev/null
+++ b/test/router/storage_1_a.lua
@@ -0,0 +1 @@
+../../example/storage.lua
\ No newline at end of file
diff --git a/test/router/storage_1_b.lua b/test/router/storage_1_b.lua
new file mode 120000
index 0000000..1f1d355
--- /dev/null
+++ b/test/router/storage_1_b.lua
@@ -0,0 +1 @@
+../../example/storage.lua
\ No newline at end of file
diff --git a/test/router/storage_2_a.lua b/test/router/storage_2_a.lua
new file mode 120000
index 0000000..1f1d355
--- /dev/null
+++ b/test/router/storage_2_a.lua
@@ -0,0 +1 @@
+../../example/storage.lua
\ No newline at end of file
diff --git a/test/router/storage_2_b.lua b/test/router/storage_2_b.lua
new file mode 120000
index 0000000..1f1d355
--- /dev/null
+++ b/test/router/storage_2_b.lua
@@ -0,0 +1 @@
+../../example/storage.lua
\ No newline at end of file
diff --git a/test/router/suite.ini b/test/router/suite.ini
new file mode 100644
index 0000000..cd750b3
--- /dev/null
+++ b/test/router/suite.ini
@@ -0,0 +1,6 @@
+[default]
+core = tarantool
+description = Router tests
+script = test.lua
+is_parallel = False
+lua_libs = ../lua_libs/util.lua ../../example/localcfg.lua
diff --git a/test/router/test.lua b/test/router/test.lua
new file mode 100644
index 0000000..cb7c1ee
--- /dev/null
+++ b/test/router/test.lua
@@ -0,0 +1,9 @@
+#!/usr/bin/env tarantool
+
+require('strict').on()
+
+box.cfg{
+ listen = os.getenv("LISTEN"),
+}
+
+require('console').listen(os.getenv('ADMIN'))
diff --git a/test/main/garbage_collector.result b/test/storage/garbage_collector.result
similarity index 94%
rename from test/main/garbage_collector.result
rename to test/storage/garbage_collector.result
index 343217f..5d5558c 100644
--- a/test/main/garbage_collector.result
+++ b/test/storage/garbage_collector.result
@@ -7,10 +7,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'storage')
---
...
util = require('util')
diff --git a/test/main/garbage_collector.test.lua b/test/storage/garbage_collector.test.lua
similarity index 93%
rename from test/main/garbage_collector.test.lua
rename to test/storage/garbage_collector.test.lua
index 5b8ed3c..1795296 100644
--- a/test/main/garbage_collector.test.lua
+++ b/test/storage/garbage_collector.test.lua
@@ -3,8 +3,8 @@ test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
+test_run:create_cluster(REPLICASET_2, 'storage')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
diff --git a/test/main/read_only_slave.result b/test/storage/read_only_slave.result
similarity index 96%
rename from test/main/read_only_slave.result
rename to test/storage/read_only_slave.result
index 9f3ef40..9d5c85e 100644
--- a/test/main/read_only_slave.result
+++ b/test/storage/read_only_slave.result
@@ -7,10 +7,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'storage')
---
...
util = require('util')
diff --git a/test/main/read_only_slave.test.lua b/test/storage/read_only_slave.test.lua
similarity index 95%
rename from test/main/read_only_slave.test.lua
rename to test/storage/read_only_slave.test.lua
index 504c30b..3253ad7 100644
--- a/test/main/read_only_slave.test.lua
+++ b/test/storage/read_only_slave.test.lua
@@ -1,8 +1,8 @@
test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
+test_run:create_cluster(REPLICASET_2, 'storage')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
diff --git a/test/main/recovery.result b/test/storage/recovery.result
similarity index 97%
rename from test/main/recovery.result
rename to test/storage/recovery.result
index 19cc2d4..d4fe6e4 100644
--- a/test/main/recovery.result
+++ b/test/storage/recovery.result
@@ -7,10 +7,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'storage')
---
...
util = require('util')
diff --git a/test/main/recovery.test.lua b/test/storage/recovery.test.lua
similarity index 96%
rename from test/main/recovery.test.lua
rename to test/storage/recovery.test.lua
index 13f1c80..b3ad269 100644
--- a/test/main/recovery.test.lua
+++ b/test/storage/recovery.test.lua
@@ -2,8 +2,8 @@ test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
+test_run:create_cluster(REPLICASET_2, 'storage')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
diff --git a/test/main/recovery_errinj.result b/test/storage/recovery_errinj.result
similarity index 93%
rename from test/main/recovery_errinj.result
rename to test/storage/recovery_errinj.result
index d4215b8..b6975fa 100644
--- a/test/main/recovery_errinj.result
+++ b/test/storage/recovery_errinj.result
@@ -7,10 +7,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'storage')
---
...
util = require('util')
diff --git a/test/main/recovery_errinj.test.lua b/test/storage/recovery_errinj.test.lua
similarity index 91%
rename from test/main/recovery_errinj.test.lua
rename to test/storage/recovery_errinj.test.lua
index f2fd8c3..76954a9 100644
--- a/test/main/recovery_errinj.test.lua
+++ b/test/storage/recovery_errinj.test.lua
@@ -2,8 +2,8 @@ test_run = require('test_run').new()
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
+test_run:create_cluster(REPLICASET_2, 'storage')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
diff --git a/test/main/storage.result b/test/storage/storage.result
similarity index 99%
rename from test/main/storage.result
rename to test/storage/storage.result
index bdb2f62..dfc7411 100644
--- a/test/main/storage.result
+++ b/test/storage/storage.result
@@ -25,10 +25,10 @@ REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
---
...
-test_run:create_cluster(REPLICASET_1, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
---
...
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_2, 'storage')
---
...
util = require('util')
diff --git a/test/main/storage.test.lua b/test/storage/storage.test.lua
similarity index 98%
rename from test/main/storage.test.lua
rename to test/storage/storage.test.lua
index e17abf9..47d9150 100644
--- a/test/main/storage.test.lua
+++ b/test/storage/storage.test.lua
@@ -8,8 +8,8 @@ fiber = require('fiber')
REPLICASET_1 = { 'storage_1_a', 'storage_1_b' }
REPLICASET_2 = { 'storage_2_a', 'storage_2_b' }
-test_run:create_cluster(REPLICASET_1, 'main')
-test_run:create_cluster(REPLICASET_2, 'main')
+test_run:create_cluster(REPLICASET_1, 'storage')
+test_run:create_cluster(REPLICASET_2, 'storage')
util = require('util')
util.wait_master(test_run, REPLICASET_1, 'storage_1_a')
util.wait_master(test_run, REPLICASET_2, 'storage_2_a')
diff --git a/test/storage/storage_1_a.lua b/test/storage/storage_1_a.lua
new file mode 120000
index 0000000..1f1d355
--- /dev/null
+++ b/test/storage/storage_1_a.lua
@@ -0,0 +1 @@
+../../example/storage.lua
\ No newline at end of file
diff --git a/test/storage/storage_1_b.lua b/test/storage/storage_1_b.lua
new file mode 120000
index 0000000..1f1d355
--- /dev/null
+++ b/test/storage/storage_1_b.lua
@@ -0,0 +1 @@
+../../example/storage.lua
\ No newline at end of file
diff --git a/test/storage/storage_2_a.lua b/test/storage/storage_2_a.lua
new file mode 120000
index 0000000..1f1d355
--- /dev/null
+++ b/test/storage/storage_2_a.lua
@@ -0,0 +1 @@
+../../example/storage.lua
\ No newline at end of file
diff --git a/test/storage/storage_2_b.lua b/test/storage/storage_2_b.lua
new file mode 120000
index 0000000..1f1d355
--- /dev/null
+++ b/test/storage/storage_2_b.lua
@@ -0,0 +1 @@
+../../example/storage.lua
\ No newline at end of file
diff --git a/test/storage/suite.ini b/test/storage/suite.ini
new file mode 100644
index 0000000..ec31230
--- /dev/null
+++ b/test/storage/suite.ini
@@ -0,0 +1,7 @@
+[default]
+core = tarantool
+description = Storage tests
+script = test.lua
+is_parallel = False
+release_disabled = recovery_errinj.test.lua
+lua_libs = ../lua_libs/util.lua ../../example/localcfg.lua
diff --git a/test/storage/test.lua b/test/storage/test.lua
new file mode 100644
index 0000000..cb7c1ee
--- /dev/null
+++ b/test/storage/test.lua
@@ -0,0 +1,9 @@
+#!/usr/bin/env tarantool
+
+require('strict').on()
+
+box.cfg{
+ listen = os.getenv("LISTEN"),
+}
+
+require('console').listen(os.getenv('ADMIN'))
--
2.14.3 (Apple Git-98)
More information about the Tarantool-patches
mailing list