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

Dependency updates #963

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
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
17 changes: 0 additions & 17 deletions irrd/scripts/irr_rpsl_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,21 +221,6 @@ def prefix(self):
return "Connection refused" # pragma: no cover


class XHTTPNotFound(XNetwork):
"""
Raised when the response returns 404.

This is a refinement of HTTPError, which is not granular enough
to provide useful information to consumers.
"""

def prefix(self):
"""
Returns the prefix to attach to the start of each logged message.
"""
return "Not found"


class XNameResolutionFailed(XNetwork):
"""
Raised when urllib cannot resolve the URL host.
Expand Down Expand Up @@ -763,8 +748,6 @@ def send_request(requests_text, args):
raise XNameResolutionFailed(args.url, reason) from error
if isinstance(reason, (socket.timeout, ConnectionRefusedError)):
raise XHTTPConnectionFailed(args.url, http_request) from error # pragma: no cover
if reason == "Not Found":
raise XHTTPNotFound(args.url, http_request) from error
raise error # pragma: no cover: CI glitch workaround
except Exception as error:
raise error
Expand Down
8 changes: 4 additions & 4 deletions irrd/scripts/tests/test_irr_rpsl_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
REGEX_UNRESOLVABLE = re.compile("Could not resolve")
REGEX_UNREACHABLE = re.compile("Connection refused|Cannot assign requested address")
REGEX_BAD_RESPONSE = re.compile("decoding JSON")
REGEX_NOT_FOUND = re.compile("Not found")
REGEX_NOT_ALLOWED = re.compile("Method Not Allowed")

EXIT_SUCCESS = 0
EXIT_CHANGE_FAILED = 1
Expand Down Expand Up @@ -767,7 +767,7 @@ def test_020_dash_o_noop(self):
EXIT_NETWORK_ERROR,
"using both -h and -O exits with value appropriate to -h value",
)
self.assertRegex(result.stderr, REGEX_NOT_FOUND)
self.assertRegex(result.stderr, REGEX_NOT_ALLOWED)

def test_030_empty_input_option(self):
result = Runner.run(["-u", IRRD_URL], ENV_EMPTY, RPSL_EMPTY)
Expand Down Expand Up @@ -841,7 +841,7 @@ def test_050_non_json_response(self):
result = Runner.run(row, ENV_EMPTY, RPSL_MINIMAL)
self.assertEqual(
result.returncode,
EXIT_RESPONSE_ERROR,
EXIT_NETWORK_ERROR,
f"Bad response URL {row[1]} exits with {EXIT_NETWORK_ERROR}",
)
self.assertRegex(result.stderr, REGEX_BAD_RESPONSE)
self.assertRegex(result.stderr, REGEX_NOT_ALLOWED)
Loading