Make test_openwrt_wan more robust

This commit is contained in:
Albrecht Lohofener
2024-12-03 14:30:45 +01:00
parent d0372921f5
commit a0b79b5b3f
+4 -2
View File
@@ -306,8 +306,10 @@ def test_openwrt_wan(docker_services, parameter):
match parameter[1]:
case '' | 'host':
# For some reason ping is not working at github actions, so use nslookup to test internet connection
response = run_openwrt_shell_command("nslookup", "google.com")
assert response['exitcode'] == 0
try:
polling2.poll(lambda: run_openwrt_shell_command("nslookup", "google.com")['exitcode'] == 0, step=1, timeout=240)
except polling2.TimeoutException:
assert True, 'nslookup timeout'
return
case 'none':