@@ -363,6 +363,25 @@ def test_rdma_config_update_validator_spc_asic_other_field(self):
363363 assert generic_config_updater .field_operation_validators .\
364364 rdma_config_update_validator (scope , patch_element ) is False
365365
366+ @patch ("sonic_py_common.device_info.get_sonic_version_info" ,
367+ mock .Mock (return_value = {"build_version" : "SONiC.20220530" }))
368+ @patch ("generic_config_updater.field_operation_validators.get_asic_name" ,
369+ mock .Mock (return_value = "spc1" ))
370+ @patch ("os.path.exists" , mock .Mock (return_value = True ))
371+ @patch ("builtins.open" , mock_open (read_data = '''{"tables": {"PFC_WD": {"validator_data": {
372+ "rdma_config_update_validator": {"PFCWD enable/disable": {"fields": [
373+ "restoration_time", "detection_time", "action", "global/poll_interval", "pfc_stat_history"
374+ ], "operations": ["remove", "replace", "add"], "platforms": {"spc1": "20181100"}}}}}}}''' ))
375+ def test_rdma_config_update_validator_spc_asic_pfc_stat_history (self ):
376+ patch_element = {
377+ "path" : "/PFC_WD/Ethernet8/pfc_stat_history" ,
378+ "op" : "replace" ,
379+ "value" : "enable"
380+ }
381+ for scope in ["localhost" , "asic0" ]:
382+ assert generic_config_updater .field_operation_validators .\
383+ rdma_config_update_validator (scope , patch_element ) is True
384+
366385 @patch ("sonic_py_common.device_info.get_sonic_version_info" ,
367386 mock .Mock (return_value = {"build_version" : "20250530.12" }))
368387 @patch ("generic_config_updater.field_operation_validators.get_asic_name" ,
0 commit comments