Skip to content

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

@jkmassel

Description

@jkmassel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions