From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [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 DF9EA469719 for ; Wed, 26 Feb 2020 18:00:42 +0300 (MSK) Date: Wed, 26 Feb 2020 17:55:21 +0300 From: Igor Munkin Message-ID: <20200226145521.GK404@tarantool.org> References: <1582130122.751366742@f143.i.mail.ru> <20200225222015.wt5azo2dlexkd745@tarantool.org> <1582726860.445056855@f382.i.mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1582726860.445056855@f382.i.mail.ru> 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: Maria Khaydich Cc: Vladislav Shpilevoy , tarantool-patches Masha, As Sasha Tu. noticed it looks to be related to the test-run issue[1]. Cced Sasha Ti. to take a look on the changes. On 26.02.20, Maria Khaydich wrote: > > Looks like this patch caused some tests to fail according to Sasha (avtikhon). > I made another commit fixing the issue. >   > ---------------------------------------------------------------------- > Previous commit that was merged into master did not do > proper clean-up. That caused occasional failures of other > tests, all with the same error saying user 'guest' already > had access on universe. >   > Closes #714 > --- > Branch: > https://github.com/tarantool/tarantool/compare/eljashm/gh-714-box-schema-user-grant-invalid-error   > >  test/box/access.result   | 18 ++++++++++++------ >  test/box/access.test.lua | 10 ++++++---- >  2 files changed, 18 insertions(+), 10 deletions(-) > diff --git a/test/box/access.result b/test/box/access.result > index b454d0eaa..e351eaf2c 100644 > --- a/test/box/access.result > +++ b/test/box/access.result > @@ -2113,23 +2113,29 @@ box.space._priv:delete{1, 'universe', 0} >  -- i.e. error on universally granted privileges shouldn't >  -- include any redundant details and/or symbols. >  -- > -box.schema.user.grant('guest', 'read,write,execute', 'universe') > +box.schema.user.create('grantee') >  --- >  ... > -box.schema.user.grant('guest', 'read,write,execute', 'universe') > +box.schema.user.grant('grantee', 'read,write,execute', 'universe') >  --- > -- error: User 'guest' already has read,write,execute access on universe > +... > +box.schema.user.grant('grantee', 'read,write,execute', 'universe') > +--- > +- error: User 'grantee' already has read,write,execute access on universe >  ... >  -- Expected behavior of grant() error shouldn't change otherwise. >  sp = box.schema.create_space('not_universe') >  --- >  ... > -box.schema.user.grant('guest', 'read,write,execute', 'space', 'not_universe') > +box.schema.user.grant('grantee', 'read,write,execute', 'space', 'not_universe') > +--- > +... > +box.schema.user.grant('grantee', 'read,write,execute', 'space', 'not_universe') >  --- > +- error: User 'grantee' already has read,write,execute access on space 'not_universe' >  ... > -box.schema.user.grant('guest', 'read,write,execute', 'space', 'not_universe') > +box.schema.user.drop('grantee') >  --- > -- error: User 'guest' already has read,write,execute access on space 'not_universe' >  ... >  sp:drop() >  --- > diff --git a/test/box/access.test.lua b/test/box/access.test.lua > index 387c8b06b..6be558247 100644 > --- a/test/box/access.test.lua > +++ b/test/box/access.test.lua > @@ -812,11 +812,13 @@ box.space._priv:delete{1, 'universe', 0} >  -- i.e. error on universally granted privileges shouldn't >  -- include any redundant details and/or symbols. >  -- > -box.schema.user.grant('guest', 'read,write,execute', 'universe') > -box.schema.user.grant('guest', 'read,write,execute', 'universe') > +box.schema.user.create('grantee') > +box.schema.user.grant('grantee', 'read,write,execute', 'universe') > +box.schema.user.grant('grantee', 'read,write,execute', 'universe') >   >  -- Expected behavior of grant() error shouldn't change otherwise. >  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') > +box.schema.user.grant('grantee', 'read,write,execute', 'space', 'not_universe') > +box.schema.user.grant('grantee', 'read,write,execute', 'space', 'not_universe') > +box.schema.user.drop('grantee') >  sp:drop() > --  > 2.24.0 >   >   > -- > Maria Khaydich >   >   [1]: https://github.com/tarantool/test-run/issues/156 -- Best regards, IM