Tarantool development patches archive
 help / color / mirror / Atom feed
From: sergeyb@tarantool.org
To: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org,
	imun@tarantool.org
Cc: o.piskunov@tarantool.org, alexander.turenko@tarantool.org
Subject: [Tarantool-patches] [PATCH v6 22/25] Fix luacheck warnings in test/xlog
Date: Fri, 29 May 2020 18:09:36 +0300	[thread overview]
Message-ID: <29ce638be79d54c519cb79b5696d86794a81f19e.1590764168.git.sergeyb@tarantool.org> (raw)
In-Reply-To: <cover.1590764167.git.sergeyb@tarantool.org>

From: Sergey Bronnikov <sergeyb@tarantool.org>

Part of #4681

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>
---
 .luacheckrc                                          |  2 +-
 test/xlog/panic.lua                                  |  2 +-
 test/xlog/reader.result                              |  2 +-
 test/xlog/reader.test.lua                            |  2 +-
 test/xlog/snap_io_rate.test.lua                      |  2 +-
 test/xlog/transaction.result                         |  2 +-
 test/xlog/transaction.test.lua                       |  2 +-
 .../upgrade/2.1.3/gh-4771-upgrade-sequence/fill.lua  | 12 ++++++------
 test/xlog/xlog.lua                                   |  2 +-
 9 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/.luacheckrc b/.luacheckrc
index a2ac96b68..c33af181f 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -17,7 +17,7 @@ exclude_files = {
     "test/var/**/*.lua",
     "test/vinyl/*.test.lua",
     "test/wal_off/*.test.lua",
-    "test/xlog/*.lua",
+    "test/xlog/*.test.lua",
     "test-run/**/*.lua",
     "third_party/**/*.lua",
     ".rocks/**/*.lua",
diff --git a/test/xlog/panic.lua b/test/xlog/panic.lua
index 2d4eb8d2e..0fa855421 100644
--- a/test/xlog/panic.lua
+++ b/test/xlog/panic.lua
@@ -1,5 +1,5 @@
 #!/usr/bin/env tarantool
-os = require('os')
+local os = require('os')
 
 box.cfg{
     listen              = os.getenv("LISTEN"),
diff --git a/test/xlog/reader.result b/test/xlog/reader.result
index 9985aa2ac..74ac3579e 100644
--- a/test/xlog/reader.result
+++ b/test/xlog/reader.result
@@ -40,7 +40,7 @@ trun:cmd("setopt delimiter ';'")
 ...
 function collect_results(file)
     local val = {}
-    for k, v in xlog(file) do
+    for _, v in xlog(file) do
         table.insert(val, setmetatable(v, { __serialize = "map"}))
     end
     return val
diff --git a/test/xlog/reader.test.lua b/test/xlog/reader.test.lua
index 327af54dd..707ba394b 100644
--- a/test/xlog/reader.test.lua
+++ b/test/xlog/reader.test.lua
@@ -21,7 +21,7 @@ pattern_ok_v13 = fio.pathjoin(pattern_prefix, "v13/")
 trun:cmd("setopt delimiter ';'")
 function collect_results(file)
     local val = {}
-    for k, v in xlog(file) do
+    for _, v in xlog(file) do
         table.insert(val, setmetatable(v, { __serialize = "map"}))
     end
     return val
diff --git a/test/xlog/snap_io_rate.test.lua b/test/xlog/snap_io_rate.test.lua
index f71296269..5626ea1f4 100644
--- a/test/xlog/snap_io_rate.test.lua
+++ b/test/xlog/snap_io_rate.test.lua
@@ -9,6 +9,6 @@ for i = 0, 127 do box.space.snap:replace({i, digest.urandom(512 * 1024)}) end
 t1 = fiber.time()
 box.snapshot()
 t2 = fiber.time()
-t2 - t1 > 64 / box.cfg.snap_io_rate_limit * 0.95
+assert(t2 - t1 > 64 / box.cfg.snap_io_rate_limit * 0.95)
 
 box.space.snap:drop()
diff --git a/test/xlog/transaction.result b/test/xlog/transaction.result
index 63adb0f25..d45b60b0a 100644
--- a/test/xlog/transaction.result
+++ b/test/xlog/transaction.result
@@ -16,7 +16,7 @@ test_run:cmd("setopt delimiter ';'")
 ...
 function read_xlog(file)
     local val = {}
-    for k, v in xlog(file) do
+    for _, v in xlog(file) do
         table.insert(val, setmetatable(v, { __serialize = "map"}))
     end
     return val
diff --git a/test/xlog/transaction.test.lua b/test/xlog/transaction.test.lua
index 2d8090b4c..5fdeec625 100644
--- a/test/xlog/transaction.test.lua
+++ b/test/xlog/transaction.test.lua
@@ -6,7 +6,7 @@ test_run = env.new()
 test_run:cmd("setopt delimiter ';'")
 function read_xlog(file)
     local val = {}
-    for k, v in xlog(file) do
+    for _, v in xlog(file) do
         table.insert(val, setmetatable(v, { __serialize = "map"}))
     end
     return val
diff --git a/test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/fill.lua b/test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/fill.lua
index b159f2b67..8e9a9d13d 100644
--- a/test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/fill.lua
+++ b/test/xlog/upgrade/2.1.3/gh-4771-upgrade-sequence/fill.lua
@@ -1,14 +1,14 @@
 box.cfg{}
-s1 = box.schema.create_space('test1')
-pk = s1:create_index('pk', {sequence = true})
+local s1 = box.schema.create_space('test1')
+s1:create_index('pk', {sequence = true})
 s1:replace{box.NULL}
 
-seq2 = box.schema.sequence.create('seq2')
-s2 = box.schema.create_space('test2')
-pk = s2:create_index('pk', {sequence = 'seq2'})
+box.schema.sequence.create('seq2')
+local s2 = box.schema.create_space('test2')
+s2:create_index('pk', {sequence = 'seq2'})
 s2:replace{box.NULL}
 
-seq3 = box.schema.sequence.create('seq3')
+local seq3 = box.schema.sequence.create('seq3')
 seq3:next()
 
 box.snapshot()
diff --git a/test/xlog/xlog.lua b/test/xlog/xlog.lua
index 004096d2d..aaf1a0ae6 100644
--- a/test/xlog/xlog.lua
+++ b/test/xlog/xlog.lua
@@ -1,5 +1,5 @@
 #!/usr/bin/env tarantool
-os = require('os')
+local os = require('os')
 
 box.cfg{
     listen              = os.getenv("LISTEN"),
-- 
2.23.0

  parent reply	other threads:[~2020-05-29 15:16 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-29 15:08 [Tarantool-patches] [PATCH v6 00/25] Add static analysis with luacheck sergeyb
2020-05-29 15:08 ` [Tarantool-patches] [PATCH v6 01/25] Add initial luacheck config sergeyb
2020-05-29 16:04   ` Igor Munkin
2020-05-29 16:27     ` Igor Munkin
2020-05-30 12:19       ` Sergey Bronnikov
2020-05-30 12:18     ` Sergey Bronnikov
2020-05-29 15:08 ` [Tarantool-patches] [PATCH v6 02/25] build: enable 'make luacheck' target sergeyb
2020-05-29 16:28   ` Igor Munkin
2020-05-29 15:08 ` [Tarantool-patches] [PATCH v6 03/25] gitlab-ci: enable static analysis with luacheck sergeyb
2020-05-29 19:25   ` Igor Munkin
2020-06-01  9:29     ` Sergey Bronnikov
2020-06-01  9:48       ` Igor Munkin
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 04/25] Fix luacheck warnings in extra/dist/tarantoolctl.in sergeyb
2020-05-29 16:35   ` Igor Munkin
2020-06-01 14:10   ` Alexander Turenko
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 05/25] Fix luacheck warnings in src/lua/ sergeyb
2020-05-29 16:51   ` Igor Munkin
2020-05-29 19:13     ` Igor Munkin
2020-05-30 12:15       ` Sergey Bronnikov
2020-06-01  9:43         ` Igor Munkin
2020-06-01 10:36           ` Sergey Bronnikov
2020-06-01  9:38     ` Sergey Bronnikov
2020-06-01 14:47   ` Alexander Turenko
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 06/25] Fix luacheck warnings in src/box/lua/ sergeyb
2020-05-29 19:11   ` Igor Munkin
2020-05-30 12:22     ` Sergey Bronnikov
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 07/25] Supress luacheck warnings in test/app sergeyb
2020-06-01 10:11   ` Igor Munkin
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 08/25] Fix luacheck warnings in test/app-tap sergeyb
2020-06-01 11:41   ` Igor Munkin
2020-07-16 11:44     ` Sergey Bronnikov
2020-07-16 12:42       ` Igor Munkin
2020-07-16 13:25         ` Sergey Bronnikov
2020-06-01 13:37   ` Alexander Turenko
2020-06-01 16:37     ` Igor Munkin
2020-06-01 17:13       ` Alexander Turenko
2020-06-01 17:38         ` Igor Munkin
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 09/25] Fix luacheck warnings in test/box sergeyb
2020-06-01 16:06   ` Igor Munkin
2020-07-16 13:23     ` Sergey Bronnikov
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 10/25] Fix luacheck warnings in test/box-py sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 11/25] Fix luacheck warnings in test/box-tap sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 12/25] Fix luacheck warnings in test/engine sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 13/25] Fix luacheck warnings in test/engine_long sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 14/25] Fix luacheck warnings in test/long_run-py sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 15/25] Fix luacheck warnings in test/replication sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 16/25] Fix luacheck warnings in test/replication-py sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 17/25] Fix luacheck warnings in test/sql sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 18/25] Fix luacheck warnings in test/sql-tap sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 19/25] Fix luacheck warnings in test/swim sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 20/25] Fix luacheck warnings in test/vinyl sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 21/25] Fix luacheck warnings in test/wal_off sergeyb
2020-05-29 15:09 ` sergeyb [this message]
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 23/25] Fix luacheck warnings in test/xlog-py sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 24/25] Add luacheck supressions for luajit tests sergeyb
2020-05-29 15:09 ` [Tarantool-patches] [PATCH v6 25/25] luajit: bump new version sergeyb
2020-06-01 17:08 ` [Tarantool-patches] [PATCH v6 00/25] Add static analysis with luacheck Vladislav Shpilevoy
2020-06-01 17:29   ` Alexander Turenko
2020-06-01 18:13     ` Igor Munkin
2020-06-02 14:42 ` Alexander Turenko
2020-06-02 15:58   ` Igor Munkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29ce638be79d54c519cb79b5696d86794a81f19e.1590764168.git.sergeyb@tarantool.org \
    --to=sergeyb@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=imun@tarantool.org \
    --cc=o.piskunov@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v6 22/25] Fix luacheck warnings in test/xlog' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox