File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 23
23
from utilities_common .sfp_helper import covert_application_advertisement_to_output_string
24
24
from utilities_common .sfp_helper import QSFP_DATA_MAP
25
25
from tabulate import tabulate
26
+ from utilities_common .general import load_db_config
26
27
27
28
VERSION = '3.0'
28
29
@@ -548,6 +549,7 @@ def load_sfputilhelper():
548
549
549
550
550
551
def load_port_config ():
552
+ load_db_config ()
551
553
try :
552
554
if multi_asic .is_multi_asic ():
553
555
# For multi ASIC platforms we pass DIR of port_config_file_path and the number of asics
Original file line number Diff line number Diff line change @@ -999,4 +999,14 @@ def test_target_firmware(self, mock_chassis):
999
999
assert result .output == 'Target Mode set failed!\n '
1000
1000
assert result .exit_code == EXIT_FAIL
1001
1001
1002
-
1002
+ @patch ('sfputil.main.multi_asic.is_multi_asic' )
1003
+ @patch ('sfputil.main.platform_sfputil' , MagicMock ())
1004
+ @patch ('sfputil.main.device_info.get_paths_to_platform_and_hwsku_dirs' ,
1005
+ MagicMock (return_value = (None , None )))
1006
+ @patch ('sfputil.main.device_info.get_path_to_port_config_file' , MagicMock (return_value = ('' )))
1007
+ def test_load_port_config (self , mock_is_multi_asic ):
1008
+ mock_is_multi_asic .return_value = True
1009
+ assert sfputil .load_port_config () == True
1010
+
1011
+ mock_is_multi_asic .return_value = False
1012
+ assert sfputil .load_port_config () == True
You can’t perform that action at this time.
0 commit comments