8000 libcnb-test: Document Docker resource teardown by edmorley · Pull Request #743 · heroku/libcnb.rs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

libcnb-test: Document Docker resource teardown #743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Improved the consistency of all user-facing libcnb.rs error message wordings. ([#722](https://github.com/heroku/libcnb.rs/pull/722))
- The assistance error message shown when the necessary cross-compilation tools are not found now also includes the `rustup target add` step. ([#729](https://github.com/heroku/libcnb.rs/pull/729))
- Updated the documentation for `TestRunner::build` and `TestContext::start_container` to mention when Docker resource teardown occurs. ([#743](https://github.com/heroku/libcnb.rs/pull/743))

### Fixed

Expand Down
4 changes: 3 additions & 1 deletion libcnb-test/src/test_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ pub struct TestContext<'a> {
}

impl<'a> TestContext<'a> {
/// Starts a container using the provided [`ContainerConfig`].
/// Starts a detached container using the provided [`ContainerConfig`].
///
/// After the passed function has returned, the Docker container is removed.
///
/// If you wish to run a shell command and don't need to customise the configuration, use
/// the convenience function [`TestContext::run_shell_command`] instead.
Expand Down
2 changes: 2 additions & 0 deletions libcnb-test/src/test_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ impl TestRunner {
/// crate, packages it as a buildpack and then invokes [pack](https://buildpacks.io/docs/tools/pack/)
/// to build a new Docker image with the buildpacks specified by the passed [`BuildConfig`].
///
/// After the passed test function has returned, the Docker image and volumes created by Pack are removed.
///
/// Since this function is supposed to only be used in integration tests, failures are not
/// signalled via [`Result`] values. Instead, this function panics whenever an unexpected error
/// occurred to simplify testing code.
Expand Down
0