Skip to content

test: cover 404 and 403 download failures in the CLI - #122

Open
Aakarsh2007 wants to merge 1 commit into
dbpedia:mainfrom
Aakarsh2007:test/download-cli-failures
Open

Aakarsh2007 wants to merge 1 commit into
dbpedia:mainfrom
Aakarsh2007:test/download-cli-failures

Conversation

@Aakarsh2007

@Aakarsh2007 Aakarsh2007 commented Dec 1, 2026 •

Copy link
Copy Markdown

Description

Add two offline CLI tests for the intended failure cases in #20. Both start with a failing file followed by a valid one:

  • HTTP 404 warns, records the failed file, and continues downloading the next file.
  • HTTP 403 exits with an access error, records it in the manifest, and stops before requesting the next file.

The tests run through Click and mock only the HTTP calls. #120 covers successful downloads through a local server, and #118 covers JSON-LD parsing.

Verification

  • Full pytest invocation: 280 passed, 3 skipped by the existing suite. The suite substitutes a SPARQL test double in conftest.py.
  • Ruff passed.

Summary by CodeRabbit

  • Tests
    • Added offline coverage for download behavior when files return “not found” or “access forbidden,” including exit status, subsequent downloads, and manifest reporting.

@Aakarsh2007 Aakarsh2007 mentioned this pull request Dec 1, 2026
3 tasks
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This change adds offline CLI tests for download HTTP failures. The tests check the CLI response and manifest after HTTP 404 and 403 responses.

Changes: Download CLI failure tests

Layer / File(s) Summary
HTTP failure scenarios
tests/test_download_cli_failures.py
A parameterized test checks HTTP 404 and 403 responses. It verifies exit codes, error messages, subsequent download behavior, and manifest entries.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Suggested reviewers: integer-ctrl

Merge Risk: Minimal · up to b56ad

This change adds tests for how downloads handle HTTP 404 and 403 responses. It does not alter production behavior, and no merge-blocking risk is identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title is specific and matches the change: it adds CLI tests covering HTTP 404 and 403 download failures. It is concise, uses the conventional 'test:' prefix, and identifies the primary change for …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description gives a clear summary of the change: two offline CLI tests for HTTP 404 and 403 failure cases, referencing issue #20. It also lists verification results (pytest and Ruff). It does not …
Full details: Title check

Explanation

The title is specific and matches the change: it adds CLI tests covering HTTP 404 and 403 download failures. It is concise, uses the conventional 'test:' prefix, and identifies the primary change for a reader scanning history.

Full details: Description check

Explanation

The description gives a clear summary of the change: two offline CLI tests for HTTP 404 and 403 failure cases, referencing issue #20. It also lists verification results (pytest and Ruff). It does not fill the template's Related Issues field with a formal link (it mentions #20 only in the body), and the Type of change section and the Checklist are absent. The author does not indicate which change type applies, and the checklist items (self-review, comments, documentation, pytest and ruff status) are not marked. Core content is present, so the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 00e59df9-3d13-4479-b634-dd579e26590e
Commits

Reviewing files that changed from the base of the PR and between b35bd2c and b56adf7.

Files selected for processing: 1

  • tests/test_download_cli_failures.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant