Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_reload_config issue #11674

Merged
merged 1 commit into from
Mar 4, 2024
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
14 changes: 0 additions & 14 deletions tests/platform_tests/test_reload_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import logging

import pytest
import re

from tests.common.fixtures.conn_graph_facts import conn_graph_facts # noqa F401
from tests.common.utilities import wait_until
Expand Down Expand Up @@ -125,9 +124,6 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
# we must give it a little longer or else it may falsely fail the test.
wait_until(360, 1, 0, check_database_status, duthost)

# Check if interfaces-config.service is exited
wait_until(60, 1, 0, check_interfaces_config_service_status, duthost)

logging.info("Reload configuration check")
out = duthost.shell("sudo config reload -y",
executable="/bin/bash", module_ignore_errors=True)
Expand All @@ -145,8 +141,6 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
logging.info("Checking config reload after system is up")
# Check if all database containers have started
wait_until(60, 1, 0, check_database_status, duthost)
# Check if interfaces-config.service is exited
wait_until(60, 1, 0, check_interfaces_config_service_status, duthost)
out = duthost.shell("sudo config reload -y",
executable="/bin/bash", module_ignore_errors=True)
assert "Retry later" in out['stdout']
Expand All @@ -170,11 +164,3 @@ def test_reload_configuration_checks(duthosts, enum_rand_one_per_hwsku_hostname,
assert "Retry later" not in out['stdout']

assert wait_until(300, 20, 0, config_system_checks_passed, duthost, delayed_services)


def check_interfaces_config_service_status(duthost):
# check interfaces-config.service status
regx_interface_config_service_exit = r'.*Main PID: \d+ \(code=exited, status=0\/SUCCESS\).*'
interface_config_server_status = duthost.command(
'systemctl status interfaces-config.service', module_ignore_errors=True)['stdout']
return re.search(regx_interface_config_service_exit, interface_config_server_status)
Loading