wordpress-mobile / wordpress-mobile/GutenbergKit

iOS: MediaUploadServer tests silently skip when server can't bind

Open
#439 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.