These were introduced as part of #666, and are part of the reason that the regression in #704 was able to sneak in (since it means the tests circumvent the top level error handling that was broken in #666).
They should be converted to additional error types and returned as an error instead.
Currently these functions mix and match assertions and returning
Result
: https://github.com/heroku/libcnb.rs/blob/2698a713edf19034e382aa702e12acc1516da8fa/libcnb-test/src/build.rs#L15-L27 https://github.com/heroku/libcnb.rs/blob/2698a713edf19034e382aa702e12acc1516da8fa/libcnb-test/src/build.rs#L74-L78These were introduced as part of #666, and are part of the reason that the regression in #704 was able to sneak in (since it means the tests circumvent the top level error handling that was broken in #666).
They should be converted to additional error types and returned as an error instead.
There's also a lint we can use to prevent this in the future: https://rust-lang.github.io/rust-clippy/master/index.html#/panic_in_result_fn (in addition to panics, it detects assertions in result functions)