fix(tests): guard skip_if_offline2 when curl is unavailable - #207
Merged
Merged
Conversation
testthat::skip_if_offline() requires curl. curl is a Suggests, so it is not in the restricted library that _R_CHECK_DEPENDS_ONLY_=true builds -- on the no-suggests leg the skip helper errors instead of skipping, failing the leg with 'The package "curl" is required'. All ten test files call skip_if_offline2(), so the guard belongs in that one helper. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012DVjmY3im9Xak7tXLSMGCa
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.
Fixes the one failing leg on #206 —
ubuntu-latest (release, nosuggests), which reports:Why
testthat::skip_if_offline()needscurl.curlis inSuggests, so it is not in the restricted library that_R_CHECK_DEPENDS_ONLY_=truebuilds for the no-suggests leg. There the helper meant to skip a test instead errors, taking the whole leg down.All ten test files call
skip_if_offline2(), so the guard goes in that single helper rather than at each call site.Note
The no-suggests leg is new to this repo — it came with the migration to the org reusable workflow, and it found this immediately. The bug was always there; nothing was testing for it.
🤖 Generated with Claude Code
https://claude.ai/code/session_012DVjmY3im9Xak7tXLSMGCa