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 20DC66E1C9; Sat, 6 Nov 2021 03:00:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 20DC66E1C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1636156822; bh=PUNKU6iAdoFpsYabB3Byb//Dwxx9OWDd/K7Qtmfvovw=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=wcObYjaBJSAJr8FAuP2MjpNVUwhWZSglGtMJl3PI9yDxS268Q2dr0DLSNzDBjOkuF zvz/sQXC1kpp/gCrhwwQuAp7y9VSwvNrX4dAAXwqe/WeSlbYeoMawvCzhFWcHYfZwT OUXMcoXN2EUUS6ku88vPSZ+jB2OKxkyY89uJgTDQ= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [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 229566CE32 for ; Sat, 6 Nov 2021 02:56:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 229566CE32 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1mj94k-0006s6-9f; Sat, 06 Nov 2021 02:56:50 +0300 To: tarantool-patches@dev.tarantool.org, sergepetrenko@tarantool.org, vdavydov@tarantool.org Date: Sat, 6 Nov 2021 00:56:38 +0100 Message-Id: <883d71b79e29a5d931240451f8ee64a5898b8ba2.1636156453.git.v.shpilevoy@tarantool.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9F9D976862A30D4FE61DAF562F6772BE8B924371C294B346B182A05F5380850406598807D88980A976223349D00FFCAA17053EE016E0F917F78CCE2870AE2E4E0 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE70186A8DAAA7CBDB1EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006371DF52D98DC3592C48638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D83B1A7E5FCD4A93169AB00E2756FB5A13117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCC908CD1B87A134A2A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520B1593CA6EC85F86DC26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B62CFFCC7B69C47339089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505F04FA6A33766571055C88A37E97E243C X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C7E8FD95C1B0C506B38494B25B48D4C1B9B4A7541CCE945229C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EFFA31AF570DAA8E08699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D340EEB18E49183157105BF11C0EAD8585529ACE4A34F7FB79720D733BF61C1084DC0DE4C0D6408B40C1D7E09C32AA3244CD5FE58687D4955D8908B09BA5FF06B431DD47778AE04E04DFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj75A/c671lqVmOGo+bdGj/g== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D3835823F8D92CA1AC94C51F612733DF83841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: [Tarantool-patches] [PATCH 7/9] luatest: copy config in cluster:build_server() 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" It takes box.cfg config as an argument. And changes the argument by adding a new key 'command'. If the caller wants to pass the same box.cfg or slightly modified to several build_server() calls, it won't work - all options will be the same on all instances. For example: local cfg = {...} cfg.replication = {url1} cluster:build_server(cfg) cfg.replication = {url2} cluster:build_server(cfg) It will not work. Both servers will get the same 'command' and the same 'replication'. --- test/luatest_helpers/cluster.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/test/luatest_helpers/cluster.lua b/test/luatest_helpers/cluster.lua index 01291b43c..43e3479f7 100644 --- a/test/luatest_helpers/cluster.lua +++ b/test/luatest_helpers/cluster.lua @@ -93,6 +93,7 @@ end function Cluster:build_server(server_config, instance_file) instance_file = instance_file or 'default.lua' + server_config = table.deepcopy(server_config) server_config.command = fio.pathjoin(root, 'test/instances/', instance_file) assert(server_config.alias, 'Either replicaset.alias or server.alias must be given') local server = Server:new(server_config) -- 2.24.3 (Apple Git-128)