-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Labels
Description
Context
The crates on crates.io are stored in S3 and served to users through our Content Delivery Networks, most importantly Fastly. On Fastly, we are using their Compute platform to run every request through a custom Rust function.
This function mainly has two responsibilities:
- It handles the request, which means applying some rewrite rules and fetching the crate from S3.
- It logs the request and sends it to the configured log destinations.
Since the function runs in WebAssembly, testing the function has been historically difficult. But Fastly provides more documentation now that might make it feasible to write unit tests for (some parts of) the function.
Tasks
- Write (a few) unit tests for the function
- Document how to run them in local development
- Run the tests automatically as part of this repository's CI