← Back to issue list

rust unit test needs to mock network connections

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1610996
Type
issue
State
closed
Author
~sergiusens
Labels
—
Created
Updated
Closed

Current evaluation

Rust plugin unit tests mocked the rustup/Cargo downloads so tests no longer hit the network. Fixed by snapcore/snapcraft PR #713, merged as commit c8e8e3c10; maintainer closed LP #1610996 citing that PR.

Resolution: closed resolved

Reason: The maintainer commented linking snapcore/snapcraft PR #713 and closed the bug. That PR, "rust plugin: mock downloads in unit tests", was merged as commit c8e8e3c10 and mocks the rust download in the unit tests, removing the real network dependency.

Evaluated by: mr-cal-bot

No scores available.

Issue body

The download of rust needs to be mocked in the unittests

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Rust plugin unit tests mocked the rustup/Cargo downloads so tests no longer hit the network. Fixed by snapcore/snapcraft PR #713, merged as commit c8e8e3c10; maintainer closed LP #1610996 citing that PR.
stealth/space-bunny-alpha — closed resolved Rust unit tests now mock downloads instead of using the network, via merged PR canonical/snapcraft#713 (commit c8e8e3c10).
stealth/space-bunny-alpha — closed stale Closed with no documented resolution; no linked PR or commit was found for mocking Rust downloads in unit tests.
qwen/qwen3.6-35b-a3b — — Closed as abandoned. Network mocking for Rust unit tests remains unimplemented.
qwen/qwen3.6-35b-a3b — — The request to mock network connections for Rust unit tests was closed without implementation or discussion. The enhancement remains abandoned and unresolved.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The request to mock Rust download network connections in unit tests was abandoned due to lack of follow-up.
qwen3.6-35b-a3b-mtp-q6 — — Requesting network mocking for Rust unit tests was closed without resolution. No pull requests were linked, indicating the task was abandoned or addressed externally.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#713 (confidence 97%)

    Merged PR cited by the maintainer in the closing comment; commit c8e8e3c10 titled 'rust plugin: mock downloads in unit tests (#713)' appears in snapcraft history.

Related issues

Issue Project State Summary Similarity
#713 rust plugin: mock downloads in unit tests snapcraft merged Merged PR #713 (commit c8e8e3c10) mocked Cargo downloads in Rust plugin unit tests, resolving LP #1610996.
75%
#2158 rust plugin: fix cargo builds and run tests snapcraft closed PR closed as superseded: the rust-plugin-improvements branch was deleted and the work was reworked and merged as snapcore/snapcraft#2170 (commit 4f80a1051) after cargo test broke cross-compilation.
70%