tests: migration test fixed

An issue was that in the `0.97.3` version we didn't have `key_uid` column, later
it was added but there was no chance to set in `key_uid` value properly during
migration and we left it empty. Now in `accounts_and_keycards_improvements.up.sql`
script a constraint `CHECK (length(trim(key_uid)) > 0)` is set for `key_uid` column and
because of it migration test couldn't pass cause `key_uid` was empty.

How it is fixed: the same test account is used but just `key_uid` was added to table to
make migration tests pass again and stored Status test account data refer to `0.132.0`
version.
This commit is contained in:
Sale Djenic 2023-05-12 20:13:21 +02:00 committed by saledjenic
parent 03f93e9f6c
commit b16a38408a
14 changed files with 72 additions and 1 deletions

View File

@ -1121,7 +1121,7 @@ func login(t *testing.T, conf *params.NodeConfig) {
func TestLoginAndMigrationsStillWorkWithExistingUsers(t *testing.T) { func TestLoginAndMigrationsStillWorkWithExistingUsers(t *testing.T) {
utils.Init() utils.Init()
srcFolder := "../static/test-0.97.3-account/" srcFolder := "../static/test-0.132.0-account/"
tmpdir := t.TempDir() tmpdir := t.TempDir()

View File

@ -0,0 +1,71 @@
t=2023-05-12T19:47:09+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:09+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:09+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:09+0200 lvl=eror msg="can't fetch tokens from store: %s" LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
t=2023-05-12T19:47:09+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:09+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:09+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:10+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:10+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:10+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:10+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:10+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:10+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:10+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:10+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:10+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:11+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:11+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:11+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:11+0200 lvl=eror msg="can't fetch tokens from store: %s" LOG15_ERROR= LOG15_ERROR="Normalized odd number of arguments by adding nil"
t=2023-05-12T19:47:11+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:11+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:11+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:11+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:11+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:11+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:12+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:12+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:12+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:12+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:12+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:12+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:12+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:12+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:47:12+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:33+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:33+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:33+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:34+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:34+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:34+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:34+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:34+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:34+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:34+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:34+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:34+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:35+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:35+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:49:35+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:14+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:14+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:14+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:14+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:14+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:14+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:15+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:15+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:15+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:15+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:15+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:15+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:15+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:15+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:15+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:16+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:16+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:16+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:16+0200 lvl=eror msg="error while mapping sync state" namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:16+0200 lvl=eror msg="Error sending messages." namespace=mvds error="sql: database is closed"
t=2023-05-12T19:59:16+0200 lvl=eror msg="Failed to persisten epoch" namespace=mvds error="sql: database is closed"