mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-08-28 17:17:14 +00:00
Realtime UI - Socketio tweaks and refactor (#3220)
This commit is contained in:
@@ -6,7 +6,7 @@ import logging
|
||||
|
||||
def test_check_notification_error_handling(client, live_server, measure_memory_usage):
|
||||
|
||||
live_server_setup(live_server)
|
||||
# live_server_setup(live_server) # Setup on conftest per function
|
||||
set_original_response()
|
||||
|
||||
# Set a URL and fetch it, then set a notification URL which is going to give errors
|
||||
@@ -60,7 +60,15 @@ def test_check_notification_error_handling(client, live_server, measure_memory_u
|
||||
# The error should show in the notification logs
|
||||
res = client.get(
|
||||
url_for("settings.notification_logs"))
|
||||
found_name_resolution_error = b"Temporary failure in name resolution" in res.data or b"Name or service not known" in res.data
|
||||
# Check for various DNS/connection error patterns that may appear in different environments
|
||||
found_name_resolution_error = (
|
||||
b"No address found" in res.data or
|
||||
b"Name or service not known" in res.data or
|
||||
b"nodename nor servname provided" in res.data or
|
||||
b"Temporary failure in name resolution" in res.data or
|
||||
b"Failed to establish a new connection" in res.data or
|
||||
b"Connection error occurred" in res.data
|
||||
)
|
||||
assert found_name_resolution_error
|
||||
|
||||
# And the working one, which is after the 'broken' one should still have fired
|
||||
|
||||
Reference in New Issue
Block a user