diff --git a/packages/backend-core/tests/core/utilities/testContainerUtils.ts b/packages/backend-core/tests/core/utilities/testContainerUtils.ts index 01906c9129..765ee2bb89 100644 --- a/packages/backend-core/tests/core/utilities/testContainerUtils.ts +++ b/packages/backend-core/tests/core/utilities/testContainerUtils.ts @@ -160,7 +160,7 @@ export async function startContainer(container: GenericContainer) { // matching container and it has exited, we remove it before carrying on. This // removes the need to do this removal manually. const existingContainer = getContainerByName(name) - if (existingContainer?.State === "exited") { + if (existingContainer && existingContainer.State !== "running") { removeContainer(existingContainer) }