Tarantool development patches archive
 help / color / mirror / Atom feed
From: Nikita Pettik <korablev@tarantool.org>
To: sergos@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] sql: forbid data changes in read-only mode
Date: Fri, 13 Nov 2020 14:01:05 +0000	[thread overview]
Message-ID: <20201113140105.GA32615@tarantool.org> (raw)
In-Reply-To: <20201110112913.28083-1-sergos@tarantool.org>

On 10 Nov 14:29, sergos@tarantool.org wrote:
> From: Sergey Ostanevich <sergos@tarantool.org>
> 
> +box.execute("ALTER TABLE TEST ADD CONSTRAINT 'uk' UNIQUE (B)")
> +test:is(
> +    tostring(err),
> +    expected_err,
> +    "add constraint should fail in read-only mode"
> +)
> +box.execute("ALTER TABLE TEST RENAME TO TEST2")
> +test:is(
> +    tostring(err),
> +    expected_err,
> +    "rename should fail in read-only mode"
> +)
> +res, err = box.execute("DROP TABLE TEST")
> +test:is(
> +    tostring(err),
> +    expected_err,
> +    "drop table should fail in read-only mode"
> +)
> +
> +-- cleanup
> +box.cfg{read_only=false}
> +res, err = box.execute("DROP TABLE TEST")
> +
> +os.exit(test:check() and 0 or 1)

Not sure if we have to call os.exit() at the end of tap tests.
Otherwise LGTM

  reply	other threads:[~2020-11-13 14:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 11:29 sergos
2020-11-13 14:01 ` Nikita Pettik [this message]
2020-11-16 10:31 ` Mergen Imeev
2020-11-16 20:36   ` Sergey Ostanevich
2020-11-16 21:09     ` Nikita Pettik
2020-11-19  7:41       ` Sergey Ostanevich
2020-11-20 13:47         ` Mergen Imeev
2020-11-22 14:55           ` Nikita Pettik

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=20201113140105.GA32615@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=sergos@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] sql: forbid data changes in read-only mode' \
    /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