From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <sergeyb@tarantool.org>
Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99])
 (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 1433445C320
 for <tarantool-patches@dev.tarantool.org>;
 Fri, 29 May 2020 18:14:38 +0300 (MSK)
From: sergeyb@tarantool.org
Date: Fri, 29 May 2020 18:09:16 +0300
Message-Id: <09d09bedf2ff6264a48684a9b433343ca9f6d456.1590764168.git.sergeyb@tarantool.org>
In-Reply-To: <cover.1590764167.git.sergeyb@tarantool.org>
References: <cover.1590764167.git.sergeyb@tarantool.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [Tarantool-patches] [PATCH v6 12/25] Fix luacheck warnings in
	test/engine
List-Id: Tarantool development patches <tarantool-patches.dev.tarantool.org>
List-Unsubscribe: <https://lists.tarantool.org/mailman/options/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=unsubscribe>
List-Archive: <https://lists.tarantool.org/pipermail/tarantool-patches/>
List-Post: <mailto:tarantool-patches@dev.tarantool.org>
List-Help: <mailto:tarantool-patches-request@dev.tarantool.org?subject=help>
List-Subscribe: <https://lists.tarantool.org/mailman/listinfo/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=subscribe>
To: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, imun@tarantool.org
Cc: o.piskunov@tarantool.org, alexander.turenko@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                             | 3 ++-
 test/engine/box.lua                     | 8 +-------
 test/engine/conflict.lua                | 6 +++---
 test/engine/tree_min_max_count.result   | 2 +-
 test/engine/tree_min_max_count.test.lua | 2 +-
 5 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/.luacheckrc b/.luacheckrc
index 23b9f1b72..88f93928b 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -8,7 +8,7 @@ exclude_files = {
     "src/box/lua/serpent.lua", -- third-party source code
     "test/app/*.test.lua",
     "test/box/**/*.lua",
-    "test/engine/*.lua",
+    "test/engine/*.test.lua",
     "test/engine_long/*.lua",
     "test/long_run-py/**/*.lua",
     "test/replication/*.lua",
@@ -63,3 +63,4 @@ files["test/box-tap/extended_error.test.lua"] = {
 	"error_access_denied", "error_throw_access_denied", "forbidden_function"},
 	ignore = {"211"}
 }
+files["test/engine/conflict.lua"] = {globals = {"test_conflict"}}
diff --git a/test/engine/box.lua b/test/engine/box.lua
index e2f04cba2..8558c9ac0 100644
--- a/test/engine/box.lua
+++ b/test/engine/box.lua
@@ -1,11 +1,5 @@
 #!/usr/bin/env tarantool
-os = require('os')
-
-local vinyl = {
-    threads = 3,
-    range_size=1024*64,
-    page_size=1024,
-}
+local os = require('os')
 
 box.cfg{
     listen              = os.getenv("LISTEN"),
diff --git a/test/engine/conflict.lua b/test/engine/conflict.lua
index b757b81d2..56c70f6ff 100644
--- a/test/engine/conflict.lua
+++ b/test/engine/conflict.lua
@@ -5,7 +5,7 @@ function test_conflict()
     local engine = inspector:get_cfg('engine')
 
     local s = box.schema.space.create('tester', {engine=engine});
-    local i = s:create_index('test_index', {type = 'tree', parts = {1, 'string'}});
+    s:create_index('test_index', {type = 'tree', parts = {1, 'string'}});
 
     local commits = 0
     local function conflict()
@@ -16,8 +16,8 @@ function test_conflict()
     end;
 
     local fiber = require('fiber');
-    local f0 = fiber.create(conflict);
-    local f1 = fiber.create(conflict); -- conflict
+    fiber.create(conflict);
+    fiber.create(conflict); -- conflict
     fiber.sleep(0);
 
     s:drop();
diff --git a/test/engine/tree_min_max_count.result b/test/engine/tree_min_max_count.result
index f55732aa6..9f1595a20 100644
--- a/test/engine/tree_min_max_count.result
+++ b/test/engine/tree_min_max_count.result
@@ -1189,7 +1189,7 @@ space6:drop()
 ---
 ...
 -- min max count after many inserts
-string = require('string')
+local string = require('string')
 ---
 ...
 space7 = box.schema.space.create('space7', { engine = engine })
diff --git a/test/engine/tree_min_max_count.test.lua b/test/engine/tree_min_max_count.test.lua
index 0633c56b3..19b5fe92d 100644
--- a/test/engine/tree_min_max_count.test.lua
+++ b/test/engine/tree_min_max_count.test.lua
@@ -337,7 +337,7 @@ space6:drop()
 
 -- min max count after many inserts
 
-string = require('string')
+local string = require('string')
 
 space7 = box.schema.space.create('space7', { engine = engine })
 index7 = space7:create_index('primary', { type = 'tree', parts = {1, 'scalar'} })
-- 
2.23.0