[Tarantool-patches] [PATCH] net.box: fix fetching of schema of an old version

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Apr 19 20:02:46 MSK 2020


On 19/04/2020 18:23, Alexander Turenko wrote:
>>> It seems logical to move snapshots out from test suites, since they will
>>> be used across the test suites. What do you think?
>>
>> It is not always the case. A snapshot is ok to use across tests only if
>> it is not related to any particular test more than to others. Only empty
>> snapshots satisfy that criteria. The reason is that we are obligated to
>> keep tests isolated from each other. And if you use one non-empty snapshot
>> for multiple tests, the policy will be violated.
> 
> (Continued snap/upgrade discussion in the sibling email thread.)
> 
> How about this directory structure?
> 
>  test/
>  |
>  +- snap/
>     |
>     +- how_to_add_new_test.md
>     |
>     +- xlog/
>     |  |
>     |  +- gh-4771-upgrade-sequence/
>     |     |
>     |     +- fill.lua
>     |     +- 2.1.3/
>     |        |
>     |        +- *.snap
>     |
>     +- box-tap/
>        |
>        +- gh-4691-net-box-connect-schema-2-1-3/
>           |
>           +- fill.lua
>           +- 2.1.3/
>              |
>              +- *.snap
> 
> Key points:
> 
> * All snapshots are in one place: it is easier to keep them right
>   structured.
> * Snapshots are organized on per-test basis.
> 
> Alternative:
> 
>  test/
>  |
>  +- xlog/
>  |  |
>  |  +- snap/
>  |     |
>  |     +- how_to_add_new_test.md
>  |     |
>  |     +- gh-4771-upgrade-sequence/
>  |        |
>  |        +- fill.lua
>  |        +- 2.1.3/
>  |           |
>  |           +- *.snap
>  |
>  +- box-tap/
>     |
>     +- snap/
>        |
>        +- how_to_add_new_test.md -> ../../xlog/snap/how_to_add_new_test.md
>        |
>        +- gh-4691-net-box-connect-schema-2-1-3/
>           |
>           +- fill.lua
>           +- 2.1.3/
>              |
>              +- *.snap
> 
> Key points:
> 
> * All snapshots organized as same structured subtrees.
> * Same as above, snapshots are organized on per-test basis.
> 
> WBR, Alexander Turenko.

Both options look good to me.


More information about the Tarantool-patches mailing list