Skip to content
Merged
Changes from 2 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
9 changes: 5 additions & 4 deletions tests/autorestart_test/test_container_autorestart.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def kill_process_by_pid(duthost, container_name, program_name, program_pid):

# Get the exit code of 'kill' command
exit_code = kill_cmd_result["rc"]
if exit_code != 0:
if exit_code != 0:
pytest.fail("Failed to stop program '{}' before test".format(program_name))

logger.info("Program '{}' in container '{}' was stopped successfully"
Expand Down Expand Up @@ -203,7 +203,7 @@ def verify_no_autorestart_with_non_critical_process(duthost, container_name, pro
duthost.shell("docker exec {} supervisorctl start {}".format(container_name, program_name))


def test_containers_autorestart(duthost):
def test_containers_autorestart(duthost, tbinfo):
"""
@summary: Test the auto-restart feature of each container against two scenarios: killing
a non-critical process to verify the container is still running; killing each
Expand All @@ -213,8 +213,9 @@ def test_containers_autorestart(duthost):
disabled_containers = get_disabled_container_list(duthost)

for container_name in container_autorestart_states.keys():
# Skip testing the database container or containers/services which are disabled
if container_name in disabled_containers or container_name == "database":
# Skip testing the database container, radv container on T1 devices and containers/services which are disabled
if (container_name in disabled_containers or container_name == "database"
or (container_name == "radv" and tbinfo["topo"]["name"] == "t1")):
logger.warning("Skip testing the container '{}'".format(container_name))
continue

Expand Down