Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write unit tests for static.crates.io function #401

Open
3 tasks
jdno opened this issue Mar 27, 2024 · 0 comments
Open
3 tasks

Write unit tests for static.crates.io function #401

jdno opened this issue Mar 27, 2024 · 0 comments
Labels
help wanted rust Pull requests that update Rust code

Comments

@jdno
Copy link
Member

jdno commented Mar 27, 2024

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:

  1. It handles the request, which means applying some rewrite rules and fetching the crate from S3.
  2. 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

Resources

@jdno jdno added help wanted rust Pull requests that update Rust code labels Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted rust Pull requests that update Rust code
Projects
None yet
Development

No branches or pull requests

1 participant