Skip to content

Commit

Permalink
added 12 new test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kanza-latif committed Jan 3, 2025
1 parent 0cf7372 commit 80eea99
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions tests/test_config_stp.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,35 @@ def test_spanning_tree_enable_mst(mock_db):

# Assert that the correct entries are set in the database
mock_db.cfgdb.mod_entry.assert_any_call('STP', "GLOBAL", {'mode': 'mst'})
mock_db.cfgdb.set_entry.assert_any_call('STP_MST', 'STP_MST|MST_INSTANCE:INSTANCE0', {'bridge_priority': 32768})
mock_db.cfgdb.set_entry.assert_any_call('STP_PORT', 'Ethernet0', {'enabled': 'true', 'root_guard': 'false', 'bpdu_guard': 'false', 'bpdu_guard_do_disable': 'false', 'portfast': 'false', 'uplink_fast': 'false'})
mock_db.cfgdb.set_entry.assert_any_call('STP_PORT', 'Ethernet1', {'enabled': 'true', 'root_guard': 'false', 'bpdu_guard': 'false', 'bpdu_guard_do_disable': 'false', 'portfast': 'false', 'uplink_fast': 'false'})
mock_db.cfgdb.set_entry.assert_any_call(
'STP_MST',
'STP_MST|MST_INSTANCE:INSTANCE0',
{'bridge_priority': 32768}
)
mock_db.cfgdb.set_entry.assert_any_call(
'STP_PORT',
'Ethernet0',
{
'enabled': 'true',
'root_guard': 'false',
'bpdu_guard': 'false',
'bpdu_guard_do_disable': 'false',
'portfast': 'false',
'uplink_fast': 'false'
}
)
mock_db.cfgdb.set_entry.assert_any_call(
'STP_PORT',
'Ethernet1',
{
'enabled': 'true',
'root_guard': 'false',
'bpdu_guard': 'false',
'bpdu_guard_do_disable': 'false',
'portfast': 'false',
'uplink_fast': 'false'
}
)


def test_disable_global_mst():
Expand Down

0 comments on commit 80eea99

Please sign in to comment.