quinn-rs / quinn

Async-friendly QUIC implementation in Rust
Apache License 2.0
3.85k stars 394 forks source link

[WIP] Introducing conformance testing crate #1494

Closed nmittler closed 1 year ago

nmittler commented 1 year ago

Based on an idea proposed in #1488. Creates a separate crate for testing crypto providers. The new crate quinn-test contains a copy of the original testing code from quinn-proto, but refactored to introduce the idea of a CryptoProvider that is used to provide crypto client/server config for the endpoints. A Suite combines a client and server CryptoProvider and contains all of the testing methods.

nmittler commented 1 year ago

This is work-in-progress, but I wanted to send it out for early feedback. I had to make a number of things public to get things working, so I expect that will be a focal point of discussion.

I included a single example test that runs the lifecycle test with the rustls provider.

nmittler commented 1 year ago

@djc PTAL. I managed to get this working by using a slightly modified version of the visibility macro.

djc commented 1 year ago

I'm not that excited about using the visibility macro for this. I still think the reverse dependency is probably a less invasive solution.

nmittler commented 1 year ago

@djc understood. I'll go ahead and close this and will open others shortly.