Skip to content
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

libcnb-test: Fix container cleanup when using TestContext::start_container #742

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

edmorley
Copy link
Member

Previously if the container started by TestContext::start_container failed to spawn, the container was left behind, since TestContext::drop was never run.

Now, the TestContext is created prior to the Docker run call, to ensure cleanup still occurs.

Fixes #737.
GUS-W-14504389.

…tainer`

Previously if the container started by `TestContext::start_container` failed
to spawn, the container was left behind, since `TestContext::drop` was
never run.

Now, the `TestContext` is created prior to the Docker run call, to ensure
cleanup still occurs.

Fixes #737.
GUS-W-14504389.
@edmorley edmorley added bug Something isn't working libcnb-test labels Nov 16, 2023
@edmorley edmorley self-assigned this Nov 16, 2023
@edmorley edmorley marked this pull request as ready for review November 16, 2023 16:38
@edmorley edmorley requested a review from a team as a code owner November 16, 2023 16:38
@edmorley edmorley merged commit 7aaf209 into main Nov 16, 2023
6 checks passed
@edmorley edmorley deleted the edmorley/fix-start_container_cleanup branch November 16, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libcnb-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libcnb-test: TestContext::start_container leaves behind the container if it failed to start
2 participants