Skip to content

Commit

Permalink
test: refer to storage server by id
Browse files Browse the repository at this point in the history
Index alias provide stable info on instance nature, yet servers list
index doesn't.
  • Loading branch information
DifferentialOrange committed Jan 23, 2024
1 parent 76d1375 commit 28d5eab
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion test/integration/borders_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local pgroup = t.group('borders', helpers.backend_matrix({
pgroup.before_all(function(g)
helpers.start_default_cluster(g, 'srv_select')

g.space_format = g.cluster.servers[2].net_box.space.customers:format()
g.space_format = g.cluster:server('s1-master').net_box.space.customers:format()
end)

pgroup.after_all(function(g)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/custom_bucket_id_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local pgroup = t.group('custom_bucket_id', helpers.backend_matrix({
pgroup.before_all(function(g)
helpers.start_default_cluster(g, 'srv_simple_operations')

g.space_format = g.cluster.servers[2].net_box.space.customers:format()
g.space_format = g.cluster:server('s1-master').net_box.space.customers:format()
end)

pgroup.after_all(function(g)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/pairs_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ local pgroup = t.group('pairs', helpers.backend_matrix({
pgroup.before_all(function(g)
helpers.start_default_cluster(g, 'srv_select')

g.space_format = g.cluster.servers[2].net_box.space.customers:format()
g.space_format = g.cluster:server('s1-master').net_box.space.customers:format()

g.cluster.main_server.net_box:eval([[
require('crud').cfg{ stats = true }
Expand Down
6 changes: 3 additions & 3 deletions test/integration/select_readview_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local pgroup = t.group('select_readview', helpers.backend_matrix({
local function init_cluster(g)
helpers.start_default_cluster(g, 'srv_select')

g.space_format = g.cluster.servers[2].net_box.space.customers:format()
g.space_format = g.cluster:server('s1-master').net_box.space.customers:format()

g.router = helpers.get_router(g.cluster, g.params.backend)
g.router.net_box:eval([[
Expand Down Expand Up @@ -2372,7 +2372,7 @@ pgroup.test_select_switch_master = function(g)
t.assert_equals(err, nil)

local replicasets = helpers.get_test_cartridge_replicasets()
set_master(g.cluster, replicasets[2].uuid, replicasets[2].servers[2].instance_uuid)
set_master(g.cluster, replicasets[2].uuid, replicasets[2]:server('s1-master').instance_uuid)

local obj, err = g.cluster.main_server.net_box:eval([[
local crud = require('crud')
Expand Down Expand Up @@ -2428,7 +2428,7 @@ pgroup.test_select_switch_master_first = function(g)
t.assert_equals(objects, helpers.get_objects_by_idxs(customers, {1, 2}))

local replicasets = helpers.get_test_cartridge_replicasets()
set_master(g.cluster, replicasets[3].uuid, replicasets[3].servers[2].instance_uuid)
set_master(g.cluster, replicasets[3].uuid, replicasets[3]:server('s1-master').instance_uuid)

local obj, err = g.cluster.main_server.net_box:eval([[
local crud = require('crud')
Expand Down
2 changes: 1 addition & 1 deletion test/integration/select_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local pgroup = t.group('select', helpers.backend_matrix({
pgroup.before_all(function(g)
helpers.start_default_cluster(g, 'srv_select')

g.space_format = g.cluster.servers[2].net_box.space.customers:format()
g.space_format = g.cluster:server('s1-master').net_box.space.customers:format()

g.router = helpers.get_router(g.cluster, g.params.backend)
g.router.net_box:eval([[
Expand Down
2 changes: 1 addition & 1 deletion test/integration/truncate_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local pgroup = t.group('truncate', helpers.backend_matrix({
pgroup.before_all(function(g)
helpers.start_default_cluster(g, 'srv_select')

g.space_format = g.cluster.servers[2].net_box.space.customers:format()
g.space_format = g.cluster:server('s1-master').net_box.space.customers:format()
end)

pgroup.after_all(function(g)
Expand Down

0 comments on commit 28d5eab

Please sign in to comment.