-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Add Linux guards to network-dependent tests in HuggingFaceProvid… #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…erTests
On Linux, FoundationNetworking uses libcurl with try! internally, which
causes fatal crashes (error code 43: CURLE_BAD_FUNCTION_ARGUMENT) instead
of throwing catchable errors when network operations fail.
Tests that made real network calls assumed errors would be catchable:
`catch { // network errors expected }`. This worked on macOS but crashed
on Linux CI.
Changes:
- Add #if os(Linux) guards to 13 network-calling tests
- On Linux, tests now verify config/model validation without network calls
- On non-Linux platforms, tests continue to make network calls as before
Affected tests:
- testAcceptsHuggingFaceModelIdentifier
- testTextToImageAcceptsHuggingFaceModel
- testTextToImageWithDefaultConfig
- testTextToImageWithHighQualityConfig
- testTextToImageWithFastConfig
- testTextToImageWithSquare512Config
- testTextToImageWithSquare1024Config
- testTextToImageWithLandscapeConfig
- testTextToImageWithPortraitConfig
- testTextToImageWithCustomConfig
- testTextToImageWithEmptyPrompt
- testTextToImageProviderAvailabilityWithoutToken
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pull Request Review: Linux Guards for Network-Dependent TestsSummaryThis PR adds ✅ Positive Aspects1. Problem Understanding
2. Consistent Pattern
3. Test Coverage Preservation
🔍 Code Quality Observations1. Test Value on Linux
|
…erTests
On Linux, FoundationNetworking uses libcurl with try! internally, which causes fatal crashes (error code 43: CURLE_BAD_FUNCTION_ARGUMENT) instead of throwing catchable errors when network operations fail.
Tests that made real network calls assumed errors would be catchable:
catch { // network errors expected }. This worked on macOS but crashed on Linux CI.Changes:
Affected tests:
🤖 Generated with Claude Code