From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id A400570368; Mon, 18 Jan 2021 12:54:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A400570368 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1610963680; bh=xtUhaGYx1yyE8WyPhIJBL6V9OQsITHO+L4umVE9CZ6w=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=j+i70CwUE4p9sLC8PZ0ZPuC03dC6xmqd+MAFLT1HsK/w7XDiQydGMggQps4paBSXD T8iFoHqSeI0fGJk7N/ZH6oYRR7a5XXd7NXtI66fqNJvlpMTOYh90gOh6YUIwcC2sjn 94iHwcjIzNDis8Jmlx7FtVz9crHT7yiDuXZnLXEU= Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 3CCCE70368 for ; Mon, 18 Jan 2021 12:54:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 3CCCE70368 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1l1RF7-00053Q-WF; Mon, 18 Jan 2021 12:54:38 +0300 To: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org Date: Mon, 18 Jan 2021 12:50:37 +0300 Message-Id: <245ed0d6e7cdf924c367fe46b31e3988a5b54922.1610963259.git.sergeyb@tarantool.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9D0E79FBC973162CDAC53986DC5FB1AB1465E8C05863AF8B800894C459B0CD1B91C8FB1FAC616CDD21B74C8613774B07516F22EFF69FDD3498E47C47A18F2969E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A9228A07F073865DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637BD378188104BC8BE8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCA61E638EF72D5022D907B95685A4A3783C861AA69A8827D4389733CBF5DBD5E913377AFFFEAFD269A417C69337E82CC2CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF3735872C767BF85DA29E625A9149C048EE0A3850AC1BE2E735463FC242DBD691A64AD6D5ED66289B524E70A05D1297E1BB35872C767BF85DA227C277FBC8AE2E8BCF17C00A082B919575ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57285124B2A10EEC6C00306258E7E6ABB4E4A6367B16DE6309 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C8F59B88ADF80E5C0604CDC3F2556201C73EA88F4A30497449C2B6934AE262D3EE7EAB7254005DCEDB7D9652AEFDB19A31E0A4E2319210D9B64D260DF9561598F01A9E91200F654B03031C89702B531498E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3429538671E6527D32059FC4353B2B8D895D573433AE05E229E2804F97DDA71F58F2F4D07A83ADD90B1D7E09C32AA3244C8195DF504945CF0A49855113B55CC73435DA7DC5AF9B58C0927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojYu4DkwLgf0JXzOLInVkyfA== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822669F6C154A38BCE9A2450E2F0423AD23DD788429FD8613638ED9BB8B05EE7B3AFB559BB5D741EB96D19CD4E7312BAA970A04DAD6CC59E33667EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH v7] test: fix luacheck warnings in test/swim X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: sergeyb@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov Closes #5465 Reviewed-by: Vladislav Shpilevoy Reviewed-by: Igor Munkin Co-authored-by: Vladislav Shpilevoy Co-authored-by: Igor Munkin --- Changelog v7: - rebased to master Changelog v6: - splitted patch in test/ for patches per sub-directory - adjusted supressions in .luacheckrc - fixed formatting issues in .luacheckrc Issue: https://github.com/tarantool/tarantool/issues/5465 Gitlab CI: https://gitlab.com/tarantool/tarantool/-/pipelines/243085008 Branch: ligurio/gh-5465-luacheck-warnings-test-swim .luacheckrc | 10 +++++++++- test/swim/box.lua | 7 +++---- test/swim/errinj.result | 5 ++++- test/swim/errinj.test.lua | 3 ++- test/swim/swim.result | 6 ++++++ test/swim/swim.test.lua | 2 ++ 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 497b1efc8..1fc4b1c7a 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -46,7 +46,7 @@ exclude_files = { "test/replication/**/*.lua", "test/replication-py/**/*.lua", "test/sql/**/*.lua", - "test/swim/**/*.lua", + "test/swim/*.test.lua", "test/var/**/*.lua", "test/vinyl/**/*.lua", "test/wal_off/*.test.lua", @@ -131,3 +131,11 @@ files["test/box-tap/extended_error.test.lua"] = { "forbidden_function", }, } +files["test/swim/box.lua"] = { + globals = { + "listen_port", + "listen_uri", + "uuid", + "uri", + } +} diff --git a/test/swim/box.lua b/test/swim/box.lua index a603777e0..d15f0c1a1 100644 --- a/test/swim/box.lua +++ b/test/swim/box.lua @@ -1,7 +1,6 @@ #!/usr/bin/env tarantool -swim = require('swim') -fiber = require('fiber') +local swim = require('swim') listen_uri = tostring(os.getenv("LISTEN")) listen_port = require('uri').parse(listen_uri).service @@ -12,8 +11,8 @@ box.cfg{} -- with encryption. Otherwise they can accidentally discover -- SWIM instances from other tests. -- -enc_key = box.info.uuid -enc_algo = 'aes128' +local enc_key = box.info.uuid +local enc_algo = 'aes128' -- -- Wrap swim.new with a codec to prevent test workers affecting diff --git a/test/swim/errinj.result b/test/swim/errinj.result index cf26b0a4a..6abf42da4 100644 --- a/test/swim/errinj.result +++ b/test/swim/errinj.result @@ -1,4 +1,7 @@ -test_run = require('test_run').new() +fiber = require('fiber') +--- +... +swim = require('swim') --- ... errinj = box.error.injection diff --git a/test/swim/errinj.test.lua b/test/swim/errinj.test.lua index 6c73f9f3d..8ef12ba8a 100644 --- a/test/swim/errinj.test.lua +++ b/test/swim/errinj.test.lua @@ -1,4 +1,5 @@ -test_run = require('test_run').new() +fiber = require('fiber') +swim = require('swim') errinj = box.error.injection -- diff --git a/test/swim/swim.result b/test/swim/swim.result index 8b7f98afc..bfc83c143 100644 --- a/test/swim/swim.result +++ b/test/swim/swim.result @@ -1,3 +1,9 @@ +fiber = require('fiber') +--- +... +swim = require('swim') +--- +... test_run = require('test_run').new() --- ... diff --git a/test/swim/swim.test.lua b/test/swim/swim.test.lua index 7e2f5a857..1593d8833 100644 --- a/test/swim/swim.test.lua +++ b/test/swim/swim.test.lua @@ -1,3 +1,5 @@ +fiber = require('fiber') +swim = require('swim') test_run = require('test_run').new() test_run:cmd("push filter '\\.lua.*:[0-9]+: ' to '.lua:: '") test_run:cmd("push filter '127.0.0.1:[0-9]+$' to '127.0.0.1:'") -- 2.25.1