rustls / rustls-ffi

Use Rustls from any language
Other
123 stars 31 forks source link

`rustls_version()` integration test #434

Closed cpu closed 2 weeks ago

cpu commented 3 weeks ago

Figuring out something to do about the manually sync'd RUSTLS_CRATE_VERSION constant in build.rs has been on my mind for a while.

As explained in the new build.rs comment I was originally thinking about populating the const automatically, but I decided against that because it seemed like it would require brittle by-hand parsing, or taking a new dep (unfortunately, it can't be a development dependency if used in build.rs). Both seemed like bad options so I landed on adding an integration test to catch if we forget to update the constant. This has the added advantage of also replacing an existing looser unit test with one that matches the full expected value from rustls_version() without adding any new hardcoded constants to maintain.

cpu commented 2 weeks ago

@ctz If you had a couple min to spare I'd love a +1 on this to get it out of my PR queue. Thanks!