From: Oleg Babin <olegrok@tarantool.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>,
tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH 3/3] test: app-tap/logger -- test symbolic loglevels
Date: Mon, 8 Jun 2020 18:31:18 +0300 [thread overview]
Message-ID: <9e807a5c-1e86-7ece-9397-66f761d70cc2@tarantool.org> (raw)
In-Reply-To: <20200608104450.157253-4-gorcunov@gmail.com>
Thanks for your patch. LGTM.
On 08/06/2020 13:44, Cyrill Gorcunov wrote:
> Part-of #689
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---
> test/app-tap/logger.test.lua | 26 +++++++++++++++++++++++++-
> 1 file changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/test/app-tap/logger.test.lua b/test/app-tap/logger.test.lua
> index c2f0ab5c0..ae4a3b99a 100755
> --- a/test/app-tap/logger.test.lua
> +++ b/test/app-tap/logger.test.lua
> @@ -1,7 +1,7 @@
> #!/usr/bin/env tarantool
>
> local test = require('tap').test('log')
> -test:plan(54)
> +test:plan(62)
>
> -- gh-3946: Assertion failure when using log_format() before box.cfg()
> local log = require('log')
> @@ -70,6 +70,30 @@ test:ok(box.cfg.log == filename, "filename match")
> test:ok(box.cfg.log_level == 6, "loglevel match")
> verify_keys("box.cfg")
>
> +-- Test symbolic names for loglevels
> +log.cfg({level='fatal'})
> +test:ok(log.cfg.level == 0 and box.cfg.log_level == 0, 'both got fatal')
> +log.cfg({level='syserror'})
> +test:ok(log.cfg.level == 1 and box.cfg.log_level == 1, 'both got syserror')
> +log.cfg({level='error'})
> +test:ok(log.cfg.level == 2 and box.cfg.log_level == 2, 'both got error')
> +log.cfg({level='crit'})
> +test:ok(log.cfg.level == 3 and box.cfg.log_level == 3, 'both got crit')
> +log.cfg({level='warn'})
> +test:ok(log.cfg.level == 4 and box.cfg.log_level == 4, 'both got warn')
> +log.cfg({level='info'})
> +test:ok(log.cfg.level == 5 and box.cfg.log_level == 5, 'both got info')
> +log.cfg({level='verbose'})
> +test:ok(log.cfg.level == 6 and box.cfg.log_level == 6, 'both got verbose')
> +log.cfg({level='debug'})
> +test:ok(log.cfg.level == 7 and box.cfg.log_level == 7, 'both got debug')
> +
> +box.cfg{
> + log = filename,
> + log_level = 6,
> + memtx_memory = 107374182,
> +}
> +
> -- Now try to change a static field.
> _, err = pcall(box.cfg, {log_level = 5, log = "2.txt"})
> test:ok(tostring(err):find("can\'t be set dynamically") ~= nil)
>
next prev parent reply other threads:[~2020-06-08 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 10:44 [Tarantool-patches] [PATCH 0/3] lua/cfg: drop unused code and extend test Cyrill Gorcunov
2020-06-08 10:44 ` [Tarantool-patches] [PATCH 1/3] lua/cfg: drop unused log methods Cyrill Gorcunov
2020-06-08 15:29 ` Oleg Babin
2020-06-08 15:33 ` Cyrill Gorcunov
2020-06-08 15:37 ` Oleg Babin
2020-06-08 10:44 ` [Tarantool-patches] [PATCH 2/3] lua/cfg: drop redundant variable Cyrill Gorcunov
2020-06-08 15:31 ` Oleg Babin
2020-06-08 10:44 ` [Tarantool-patches] [PATCH 3/3] test: app-tap/logger -- test symbolic loglevels Cyrill Gorcunov
2020-06-08 15:31 ` Oleg Babin [this message]
2020-06-09 8:26 ` Kirill Yukhin
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=9e807a5c-1e86-7ece-9397-66f761d70cc2@tarantool.org \
--to=olegrok@tarantool.org \
--cc=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 3/3] test: app-tap/logger -- test symbolic loglevels' \
/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