Skip to content

fix(tests): guard skip_if_offline2 when curl is unavailable - #207

Merged
eliotmcintire merged 1 commit into
developmentfrom
fix/skip-if-offline-needs-curl
Sep 1, 2026
Merged

eliotmcintire merged 1 commit into
developmentfrom
fix/skip-if-offline-needs-curl

Conversation

@eliotmcintire

Copy link
Copy Markdown
Contributor

Fixes the one failing leg on #206 — ubuntu-latest (release, nosuggests), which reports:

Error in `skip_if_offline("github.com")`: The package "curl" is required.

Why

testthat::skip_if_offline() needs curl. curl is in Suggests, so it is not in the restricted library that _R_CHECK_DEPENDS_ONLY_=true builds 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

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
@eliotmcintire
eliotmcintire merged commit 8e41850 into development Sep 1, 2026
14 checks passed
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