Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/test_pretest.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,17 @@ def test_disable_rsyslog_rate_limit(duthosts, enum_dut_hostname):
# We don't want to fail here because it's an util
logging.warn("Failed to retrieve feature status")
return
config_facts = duthost.config_facts(host=duthost.hostname, source="running")
try:
is_dhcp_server_enable = config_facts["ansible_facts"]["DEVICE_METADATA"]["localhost"]["dhcp_server"]
except KeyError:
is_dhcp_server_enable = None
for feature_name, state in features_dict.items():
if 'enabled' not in state:
continue
# Skip dhcp_relay check if dhcp_server is enabled
if is_dhcp_server_enable is not None and "enabled" in is_dhcp_server_enable and feature_name == "dhcp_relay":
continue
duthost.modify_syslog_rate_limit(feature_name, rl_option='disable')


Expand Down