Skip to content

Commit

Permalink
[db_migrator] Set correct CURRENT_VERSION, extend UT
Browse files Browse the repository at this point in the history
Signed-off-by: vadymhlushko-mlnx <vadymh@nvidia.com>
  • Loading branch information
vadymhlushko-mlnx committed Jul 11, 2023
1 parent 62534a1 commit 3955c68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, namespace, socket=None):
none-zero values.
build: sequentially increase within a minor version domain.
"""
self.CURRENT_VERSION = 'version_2_0_4'
self.CURRENT_VERSION = 'version_2_0_5'

self.TABLE_NAME = 'VERSIONS'
self.TABLE_KEY = 'DATABASE'
Expand Down
3 changes: 2 additions & 1 deletion tests/db_migrator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,4 +382,5 @@ def test_fast_reboot_upgrade_to_2_0_5(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)
assert not self.check_config_db(dbmgtr.configDB, expected_db.cfgdb)
assert dbmgtr.CURRENT_VERSION == expected_db.cfgdb.get_entry('VERSIONS', 'DATABASE')['VERSION']

0 comments on commit 3955c68

Please sign in to comment.