Skip to content

Commit 1edc3a9

Browse files
committed
test: fix the excess upvalues: yaml error in helpers
storage_wait_follow_f() function from luatest_helpers/vtest.lua mentioned globally defined yaml library. Fix it. NO_DOC=test
1 parent 30a2362 commit 1edc3a9

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

.luacheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ local test_rules = {
3636
'113/ivtest',
3737
'113/ivutil',
3838
'113/iwait_timeout',
39+
'113/iyaml',
3940
}
4041
}
4142

test/instances/router.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ _G.ivtest = require('test.luatest_helpers.vtest')
1313
_G.ivconst = require('vshard.consts')
1414
_G.iverror = require('vshard.error')
1515
_G.iwait_timeout = _G.ivtest.wait_timeout
16+
_G.iyaml = require('yaml')
1617

1718
-- Do not load entire vshard into the global namespace to catch errors when code
1819
-- relies on that.

test/instances/storage.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ _G.ivconst = require('vshard.consts')
1313
_G.ivutil = require('vshard.util')
1414
_G.iverror = require('vshard.error')
1515
_G.ivtest = require('test.luatest_helpers.vtest')
16+
_G.iyaml = require('yaml')
1617

1718
_G.iwait_timeout = _G.ivtest.wait_timeout
1819

test/luatest_helpers/vtest.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ local cluster = require('test.luatest_helpers.cluster')
44
local fio = require('fio')
55
local fiber = require('fiber')
66
local uuid = require('uuid')
7-
local yaml = require('yaml')
87
local vcfg = require('vshard.cfg')
98
local vrepset = require('vshard.replicaset')
109
local log = require('log')
@@ -552,7 +551,7 @@ local function storage_wait_follow_f(id)
552551
do return end
553552
::retry::
554553
if ifiber.clock() > deadline or status == 'stopped' then
555-
ilt.fail(yaml.encode({
554+
ilt.fail(iyaml.encode({
556555
err = last_err,
557556
dst_id = id,
558557
replication_info = box.info.replication,

0 commit comments

Comments
 (0)