From: Alexander Turenko <alexander.turenko@tarantool.org>
To: Igor Munkin <imun@tarantool.org>,
Maria Khaydich <maria.khaydich@tarantool.org>
Cc: tarantool-patches <tarantool-patches@dev.tarantool.org>,
Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH] box: user.grant error should be versatile
Date: Fri, 28 Feb 2020 00:06:18 +0300 [thread overview]
Message-ID: <20200227210618.wy7yvn2tlkbnkybd@tkn_work_nb> (raw)
In-Reply-To: <20200227143008.GP404@tarantool.org>
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 <maria.khaydich@tarantool.org>
| 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.
prev parent reply other threads:[~2020-02-27 21:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 16:35 Maria Khaydich
2020-02-20 10:47 ` Igor Munkin
2020-02-20 15:48 ` Maria Khaydich
2020-02-20 22:44 ` Vladislav Shpilevoy
2020-02-20 22:45 ` Vladislav Shpilevoy
2020-02-24 19:57 ` Kirill Yukhin
2020-02-25 11:53 ` Maria Khaydich
2020-02-25 22:20 ` Kirill Yukhin
2020-02-26 14:21 ` Maria Khaydich
2020-02-26 14:55 ` Igor Munkin
2020-02-26 15:16 ` Alexander Tikhonov
2020-02-27 14:30 ` Igor Munkin
2020-02-27 21:06 ` Alexander Turenko [this message]
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=20200227210618.wy7yvn2tlkbnkybd@tkn_work_nb \
--to=alexander.turenko@tarantool.org \
--cc=imun@tarantool.org \
--cc=maria.khaydich@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] box: user.grant error should be versatile' \
/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