Skip to content

Commit

Permalink
test: fix compatibility with Tarantool master
Browse files Browse the repository at this point in the history
We need use `box.info.replication.uuid` instead of
`box.info.cluster.uuid` to support Tarantool 3.0.

Closes #293
  • Loading branch information
oleg-jukovec committed May 19, 2023
1 parent cdfcddf commit a57a063
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.

### Fixed

- crud tests with Tarantool 3.0 (#293)

## [1.11.0] - 2023-05-18

The release adds pagination support and wrappers for the
Expand Down
16 changes: 13 additions & 3 deletions crud/testdata/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,22 @@ box.once('guest', function()
box.schema.user.grant('guest', 'super')
end)
local uri = 'guest@127.0.0.1:3013'
local box_info = box.info()

local replicaset_uuid
if box_info.replicaset then
-- Since Tarantool 3.0.
replicaset_uuid = box_info.replicaset.uuid
else
replicaset_uuid = box_info.cluster.uuid
end

local cfg = {
bucket_count = 300,
sharding = {
[box.info().cluster.uuid] = {
[replicaset_uuid] = {
replicas = {
[box.info().uuid] = {
[box_info.uuid] = {
uri = uri,
name = 'storage',
master = true,
Expand All @@ -89,7 +99,7 @@ local cfg = {
},
},
}
vshard.storage.cfg(cfg, box.info().uuid)
vshard.storage.cfg(cfg, box_info.uuid)
vshard.router.cfg(cfg)
vshard.router.bootstrap()

Expand Down

0 comments on commit a57a063

Please sign in to comment.