Repository navigation
DPI-5053: Serve DownloadXLSX test files from a local server - #82
Open
instantepiphany wants to merge 1 commit into
Open
instantepiphany wants to merge 1 commit into
instantepiphany wants to merge 1 commit into
Conversation
The test downloaded its fixtures from GitHub and the Q wiki, so it failed without network access, as in the Nix build sandbox. A webfakes server now serves the same files from tests/testthat/xlsxfiles.
instantepiphany
marked this pull request as ready for review
October 28, 2026 02:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
DPI-5053 runs this package's tests in Nix, which doesn't allow network access.
test-downloadxlsx.Rdownloaded its fixtures from GitHub and the Q wiki, so it failed there withCould not download file from …. The test is meant to exerciseDownloadXLSX()'s download and parsing, not those particular hosts.What changes
tests/testthat/test-downloadxlsx.R: awebfakesapp servestests/testthat/xlsxfiles/on localhost, and all 11DownloadXLSX()calls use that URL.DownloadXLSX()still downloads over HTTP, so the download path is still tested. No assertion changed.tests/testthat/xlsxfiles/Cola_Discriminant_Functions.xlsx: new, an unchanged copy of the publicly available Q wiki file the test downloaded before, so it can be served locally.DESCRIPTION:webfakesadded toSuggests, since only the tests use it.How it was verified
Do not merge this PR. It will be merged in order with various other PRs to ensure related fixes land at the same time.