wordpress-mobile / wordpress-mobile/GutenbergKit
iOS: MediaUploadServer tests silently skip when server can't bind
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29
- Forks
- 6
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Summary
MediaUploadServerTests uses .enabled(if: _canStartUploadServer) to skip the entire suite if HTTPServer can't bind a port. This means test failures due to binding issues are invisible — the suite reports as skipped rather than failing.
Location
ios/Tests/GutenbergKitTests/Media/MediaUploadServerTests.swift (lines 7-32)
Current behavior
A static check tries to start and stop a server at import time. If it fails, all tests in the suite are silently skipped via Swift Testing's .enabled(if:) trait.
Suggested behavior
Tests should fail, not skip, when the server can't start. If there are known environments where binding is expected to fail (e.g., specific CI sandboxes), those should be identified explicitly rather than using a blanket skip.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ios/Tests/GutenbergKitTests/Media/MediaUploadServerTests.swift, especially lines 7-32, and trace the static server check and Swift Testing enabled trait. Run MediaUploadServerTests in an environment where HTTPServer cannot bind, then verify that binding failures are reported as test failures rather than silently skipping the suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100