diff --git a/tests/autorestart_test/test_container_autorestart.py b/tests/autorestart/test_container_autorestart.py similarity index 97% rename from tests/autorestart_test/test_container_autorestart.py rename to tests/autorestart/test_container_autorestart.py index 389501f6e0c..67acb1a4e8b 100755 --- a/tests/autorestart_test/test_container_autorestart.py +++ b/tests/autorestart/test_container_autorestart.py @@ -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" @@ -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 @@ -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"]["type"] != "t0")): logger.warning("Skip testing the container '{}'".format(container_name)) continue