Skip to content

Commit ab957c4

Browse files
committed
test: fix compatibility with Tarantool master
We need use `box.info.replication.uuid` instead of `box.info.cluster.uuid` to support Tarantool 3.0. Closes #293
1 parent cdfcddf commit ab957c4

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
1414

1515
### Fixed
1616

17+
- crud tests with Tarantool 3.0 (#293)
18+
1719
## [1.11.0] - 2023-05-18
1820

1921
The release adds pagination support and wrappers for the

crud/testdata/config.lua

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,22 @@ box.once('guest', function()
7575
box.schema.user.grant('guest', 'super')
7676
end)
7777
local uri = '[email protected]:3013'
78+
local box_info = box.info()
79+
80+
local replicaset_uuid
81+
if box_info.replicaset then
82+
-- Since Tarantool 3.0.
83+
replicaset_uuid = box_info.replicaset.uuid
84+
else
85+
replicaset_uuid = box_info.cluster.uuid
86+
end
87+
7888
local cfg = {
7989
bucket_count = 300,
8090
sharding = {
81-
[box.info().cluster.uuid] = {
91+
[replicaset_uuid] = {
8292
replicas = {
83-
[box.info().uuid] = {
93+
[box_info.uuid] = {
8494
uri = uri,
8595
name = 'storage',
8696
master = true,
@@ -89,7 +99,7 @@ local cfg = {
8999
},
90100
},
91101
}
92-
vshard.storage.cfg(cfg, box.info().uuid)
102+
vshard.storage.cfg(cfg, box_info.uuid)
93103
vshard.router.cfg(cfg)
94104
vshard.router.bootstrap()
95105

0 commit comments

Comments
 (0)