* [Tarantool-patches] [PATCH v7] test: fix luacheck warnings in test/swim
@ 2021-01-18 9:50 Sergey Bronnikov via Tarantool-patches
2021-01-21 20:56 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-22 8:50 ` Kirill Yukhin via Tarantool-patches
0 siblings, 2 replies; 3+ messages in thread
From: Sergey Bronnikov via Tarantool-patches @ 2021-01-18 9:50 UTC (permalink / raw)
To: tarantool-patches, v.shpilevoy
From: Sergey Bronnikov <sergeyb@tarantool.org>
Closes #5465
Reviewed-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Reviewed-by: Igor Munkin <imun@tarantool.org>
Co-authored-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Co-authored-by: Igor Munkin <imun@tarantool.org>
---
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:<line>: '")
test_run:cmd("push filter '127.0.0.1:[0-9]+$' to '127.0.0.1:<port>'")
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Tarantool-patches] [PATCH v7] test: fix luacheck warnings in test/swim
2021-01-18 9:50 [Tarantool-patches] [PATCH v7] test: fix luacheck warnings in test/swim Sergey Bronnikov via Tarantool-patches
@ 2021-01-21 20:56 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-22 8:50 ` Kirill Yukhin via Tarantool-patches
1 sibling, 0 replies; 3+ messages in thread
From: Vladislav Shpilevoy via Tarantool-patches @ 2021-01-21 20:56 UTC (permalink / raw)
To: sergeyb, tarantool-patches
Hi! Thanks for the patch!
LGTM.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Tarantool-patches] [PATCH v7] test: fix luacheck warnings in test/swim
2021-01-18 9:50 [Tarantool-patches] [PATCH v7] test: fix luacheck warnings in test/swim Sergey Bronnikov via Tarantool-patches
2021-01-21 20:56 ` Vladislav Shpilevoy via Tarantool-patches
@ 2021-01-22 8:50 ` Kirill Yukhin via Tarantool-patches
1 sibling, 0 replies; 3+ messages in thread
From: Kirill Yukhin via Tarantool-patches @ 2021-01-22 8:50 UTC (permalink / raw)
To: sergeyb; +Cc: tarantool-patches, v.shpilevoy
Hello,
On 18 янв 12:50, Sergey Bronnikov via Tarantool-patches wrote:
> From: Sergey Bronnikov <sergeyb@tarantool.org>
>
> Closes #5465
>
> Reviewed-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
> Reviewed-by: Igor Munkin <imun@tarantool.org>
>
> Co-authored-by: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
> Co-authored-by: Igor Munkin <imun@tarantool.org>
> ---
>
> 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
I've checked your patch into 2.6, 2.7 and master.
--
Regards, Kirill Yukhin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-22 8:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 9:50 [Tarantool-patches] [PATCH v7] test: fix luacheck warnings in test/swim Sergey Bronnikov via Tarantool-patches
2021-01-21 20:56 ` Vladislav Shpilevoy via Tarantool-patches
2021-01-22 8:50 ` Kirill Yukhin via Tarantool-patches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox