swift-server / swift-server/async-http-client
support fake I/O layer
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
Many libraries depend on AHC which is great. The downside is that that means to test these libraries they either need to provide a layer which allows to fake AHC or we have to spin up an actual server (say on localhost) to write integration tests with these libraries. That's super tedious and sometimes impossible.
AHC should allow to take a fake I/O layer which allows to run any AHC request without ever doing a network connection or a DNS lookup.
In the #392 suggestion, that would live in Tier 1. So for testing, one could create a fake HTTPService which never actually speaks HTTP over a network protocol.
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 by reviewing AHC's HTTPService and the Tier 1 suggestion in issue #392 to understand the intended abstraction. Define how a fake I/O layer can handle any AHC request without network connections or DNS lookups, and verify that a fake HTTPService can support library tests without a real server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- backend-api-design, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100