google / sxg-rs

A set of tools for generating signed exchanges at serve time.
Apache License 2.0
83 stars 20 forks source link

Add end-to-end tests to CI #42

Open twifkak opened 3 years ago

twifkak commented 3 years ago

41 runs the unit tests for Rust & TypeScript. Add to this, something that tests that they interact correctly with each other and with the Cloudflare Worker environment. Ideas:

End-to-end tests:

Integration tests for individual TS functions:

twifkak commented 3 years ago

As an interim solution, maybe some almost e2e tests, like a CLI SXG generator and a shell script that pipes it to dump-signedexchange -verify.

Plus wrangler build and the fastly_compute equivalent.

twifkak commented 2 years ago

I'm thinking at a minimum the test plan should be a matrix of:

Accept header:

Response:

twifkak commented 2 years ago

Another possible alternative to wrangler dev is Cloudflare's Miniflare which is a local Workers emulator.