From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (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 A3B39469719 for ; Fri, 28 Feb 2020 00:06:22 +0300 (MSK) Date: Fri, 28 Feb 2020 00:06:18 +0300 From: Alexander Turenko Message-ID: <20200227210618.wy7yvn2tlkbnkybd@tkn_work_nb> References: <1582130122.751366742@f143.i.mail.ru> <20200225222015.wt5azo2dlexkd745@tarantool.org> <1582726860.445056855@f382.i.mail.ru> <20200227143008.GP404@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200227143008.GP404@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] box: user.grant error should be versatile List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Munkin , Maria Khaydich Cc: tarantool-patches , Vladislav Shpilevoy We can just revoke privileges granted for 'guest' and the patch will be smaller. Changed the patch and the description (in the spirit of Igor's wording). The result: | commit e33216af9889a2387f331fd30c157d60292bdc5b | Author: Maria | Date: Wed Feb 26 16:55:36 2020 +0300 | | test: add clean up for box/access test | | The commit e8009f4158fc2d6efa2824cd634564b3c7a2f899 ('box: user.grant | error should be versatile') did not do proper clean-up: it grants | non-default privileges for user 'guest' and does not revoke them at the | end. That caused occasional failures of other tests, all with the same | error saying user 'guest' already had access on universe. | | This case should be handled by test-run in a future, see [1]. | | [1]: https://github.com/tarantool/test-run/issues/156 | | Follows up #714 | | diff --git a/test/box/access.result b/test/box/access.result | index b454d0eaa..20b1b8b35 100644 | --- a/test/box/access.result | +++ b/test/box/access.result | @@ -2131,6 +2131,13 @@ box.schema.user.grant('guest', 'read,write,execute', 'space', 'not_universe') | --- | - error: User 'guest' already has read,write,execute access on space 'not_universe' | ... | +-- Clean up. | +box.schema.user.revoke('guest', 'read,write,execute', 'universe') | +--- | +... | +box.schema.user.revoke('guest', 'read,write,execute', 'space', 'not_universe') | +--- | +... | sp:drop() | --- | ... | diff --git a/test/box/access.test.lua b/test/box/access.test.lua | index 387c8b06b..3e083a383 100644 | --- a/test/box/access.test.lua | +++ b/test/box/access.test.lua | @@ -819,4 +819,8 @@ box.schema.user.grant('guest', 'read,write,execute', 'universe') | sp = box.schema.create_space('not_universe') | box.schema.user.grant('guest', 'read,write,execute', 'space', 'not_universe') | box.schema.user.grant('guest', 'read,write,execute', 'space', 'not_universe') | + | +-- Clean up. | +box.schema.user.revoke('guest', 'read,write,execute', 'universe') | +box.schema.user.revoke('guest', 'read,write,execute', 'space', 'not_universe') | sp:drop() Pushed to master. CCed Kirill. WBR, Alexander Turenko.