When running e2e tests for ctr, if a test fails, then there is a high chance that the testing code does not remove the container. When this happens, then it is impossible to re-run the same test in the same machine, because there are leftover containers in ctr with the same name.
=== RUN TestCtr/Firecracker-linux-environment-variables
tests_skeleton.go:80: Failed to run unikernel container: ctr: snapshot "Firecracker-linux-e
nvironment-variables": already exists -- exit status 1
--- FAIL: TestCtr (61.10s)
To fix this, when a tr test fails, we need to make sure that the testing code removes the respective container.
When running e2e tests for ctr, if a test fails, then there is a high chance that the testing code does not remove the container. When this happens, then it is impossible to re-run the same test in the same machine, because there are leftover containers in ctr with the same name.
To fix this, when a tr test fails, we need to make sure that the testing code removes the respective container.