Skip to content

Commit

Permalink
testing db_migrator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammadUmarAsad committed Feb 24, 2023
1 parent 9547b95 commit f7bc359
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/db_migrator_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,11 @@ def test_switchport_mode_migrator(self):
dbconnector.dedicated_dbs['CONFIG_DB'] = os.path.join(mock_db_path, 'config_db', 'switchport-expected')
expected_db = Db()
advance_version_for_expected_database(dbmgtr.configDB, expected_db.cfgdb, 'version_4_0_1')
print("dbmgtr port",dbmgtr.configDB.get_table('PORT'))
print("expected port",expected_db.configDB.get_table('PORT'))
print("dbmgtr portccc",dbmgtr.configDB.get_table('PORTCHANNEL'))
print("dbmgtrcccc portccc",expected_db.configDB.get_table('PORTCHANNEL'))
test = dbmgtr.configDB.get_table('PORT')
test += expected_db.cfgdb.get_table('PORT')
test += expected_db.cfgdb.get_table('PORTCHANNEL')
test += expected_db.cfgdb.get_table('PORTCHANNEL')

assert dbmgtr.configDB.get_table('PORT') == expected_db.cfgdb.get_table('PORT')
assert dbmgtr.configDB.get_table('PORTCHANNEL') == expected_db.cfgdb.get_table('PORTCHANNEL')
assert dbmgtr.configDB.get_table('VERSIONS') == expected_db.cfgdb.get_table('VERSIONS')
Expand Down

0 comments on commit f7bc359

Please sign in to comment.