heroku / libcnb.rs

A framework for writing Cloud Native Buildpacks in Rust
BSD 3-Clause "New" or "Revised" License
37 stars 8 forks source link

libcnb-test: Images are removed multiple times when using `TestContext::rebuild` #735

Closed edmorley closed 11 months ago

edmorley commented 11 months ago

Currently libcnb-test's teardown cleanup of the generated app image occurs in TestContext::drop. This combined with TestContext::rebuild() creating a brand new context means that as each of these TestContexts are torn down, the cleanup of images (which are the same image name for each rebuild) occurs multiple times.

To resolve this, the image name perhaps needs to be moved into a separate data type that has its own cleanup, that can be owned by the initial TestRunner::build call, and used by reference thereafter.

We're about to add even more teardown in order to fix #570, which raises the priority of this.

GUS-W-14503186.