From 1d93499ba5de0e5efb9a68b36023123ac7b8e9c5 Mon Sep 17 00:00:00 2001 From: vadymhlushko-mlnx Date: Thu, 6 Jul 2023 20:40:52 +0300 Subject: [PATCH] [db_migrator] Set correct CURRENT_VERSION, extend UT Signed-off-by: vadymhlushko-mlnx --- scripts/db_migrator.py | 2 +- tests/db_migrator_test.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/db_migrator.py b/scripts/db_migrator.py index 0f009985cd..9c11ab20f4 100755 --- a/scripts/db_migrator.py +++ b/scripts/db_migrator.py @@ -47,7 +47,7 @@ def __init__(self, namespace, socket=None): none-zero values. build: sequentially increase within a minor version domain. """ - self.CURRENT_VERSION = 'version_4_0_2' + self.CURRENT_VERSION = 'version_4_0_3' self.TABLE_NAME = 'VERSIONS' self.TABLE_KEY = 'DATABASE' diff --git a/tests/db_migrator_test.py b/tests/db_migrator_test.py index e038db93bb..02c56f9195 100644 --- a/tests/db_migrator_test.py +++ b/tests/db_migrator_test.py @@ -674,4 +674,5 @@ def test_fast_reboot_upgrade_to_4_0_3(self): dbmgtr = db_migrator.DBMigrator(None) dbmgtr.migrate() expected_db = self.mock_dedicated_config_db(db_after_migrate) - assert not self.check_config_db(dbmgtr.configDB, expected_db.cfgdb) \ No newline at end of file + assert not self.check_config_db(dbmgtr.configDB, expected_db.cfgdb) + assert dbmgtr.CURRENT_VERSION == expected_db.cfgdb.get_entry('VERSIONS', 'DATABASE')['VERSION'] \ No newline at end of file