Test deletes toolbox container
Hello, running coverage tests with tox I've found that it deleted my toolbox container (and maybe another one, I'm not sure). I run tests on Fedora Silverblue 42, as my user, outside of any container, running only the step test_container_commit in podman/tests/integration/test_containers.py is enough, with
tox -e py -- -k test_container_commit
edit: I guess this is working as intended, I found that in podman/tests/integration/test_containers.py the setUp function removes all the running containers before doing anything else.
@fulminemizzega thanks for the report. It shouldn't do that. The client is initialized on the testing sock, so all containers should be forcefully removed from the testing sock only
Can you share steps to reproduce?
Setup ssh login with a password-less key on the local user, setup a venv (I use uv, to I just run uv sync to create a venv), source it then run the test as a standard user. I also have the podman.socket user unit running, but I don't know if it makes a difference. Even if it uses a testing socket, I see container images pulled by testing left in the list of images (libpod/alpine and libpod/alpine_labels) (with podman images), so... I guess it is reaching the same container runtime that I use normally. In the first message I was not sure that it deleted just the toolbox, I now know that it really deletes all the running containers under my user (I run testing with podman rootless as my user), I have two containers that are started by systemd units and even those two are deleted, but they are recreated by systemd as soon as the test kills them.
I know the steps are not exact, if I need to be more precise I need to run it again and kill another toolbox... so let me know.
yup, I can reproduce it. let me debug it