[tarantool-patches] Re: [PATCH v2 2/2] Fixed lost format on update and upsert operations.
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Mon Apr 16 20:14:10 MSK 2018
Now the patch looks good to me, except commit messages, that I fixed on
branch - see the new ones, Kirill. The commit message header must fit
into 50 symbols, contain "<subsystem>:" prefix, be in imperative
mood, and do not contain dot at the end. That is instead of
Fixed lost tuple format.
You must write
tuple: fix lost tuple format
The commit message body must fit into 80 symbols.
Vova, can you please take a look on the patch?
On 16/04/2018 19:51, Kirill Shcherbatov wrote:
> From 84f2fc22124c2a2d1450de9b818f61c9c1cf31b0 Mon Sep 17 00:00:00 2001
> From: Kirill Shcherbatov <kshcherbatov at tarantool.org>
> Date: Mon, 16 Apr 2018 19:50:04 +0300
> Subject: [PATCH] New tests for invalid update and upsert
>
> ---
> test/engine/update.result | 10 ++++++++++
> test/engine/update.test.lua | 5 ++++-
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/test/engine/update.result b/test/engine/update.result
> index 48398d2..0ae22ac 100644
> --- a/test/engine/update.result
> +++ b/test/engine/update.result
> @@ -719,6 +719,11 @@ aa.VAL
> ---
> - ssss
> ...
> +-- invalid update
> +aa:update({{'=',2, 666}})
> +---
> +- error: 'Tuple field 2 type does not match one required by operation: expected string'
> +...
> -- test transform integrity
> aa:transform(-1, 1)
> ---
> @@ -741,6 +746,11 @@ box.space.tst_sample:get(2).VAL
> ---
> - wwwww2
> ...
> +-- invalid upsert
> +s:upsert({2, 666}, {{'=', 2, 666}})
> +---
> +- error: 'Tuple field 2 type does not match one required by operation: expected string'
> +...
> s:drop()
> ---
> ...
> diff --git a/test/engine/update.test.lua b/test/engine/update.test.lua
> index c53e458..3ff7e62 100644
> --- a/test/engine/update.test.lua
> +++ b/test/engine/update.test.lua
> @@ -108,6 +108,8 @@ aa = box.space.tst_sample:get(1)
> aa.VAL
> aa = aa:update({{'=',2,'ssss'}})
> aa.VAL
> +-- invalid update
> +aa:update({{'=',2, 666}})
> -- test transform integrity
> aa:transform(-1, 1)
> aa = nil
> @@ -116,5 +118,6 @@ s:upsert({2, 'wwwww'}, {{'=', 2, 'wwwww'}})
> box.space.tst_sample:get(2).VAL
> s:upsert({2, 'wwwww2'}, {{'=', 2, 'wwwww2'}})
> box.space.tst_sample:get(2).VAL
> -
> +-- invalid upsert
> +s:upsert({2, 666}, {{'=', 2, 666}})
> s:drop()
>
More information about the Tarantool-patches
mailing list