debian-forge/osbuild/testutil
Michael Vogt a3f86a0736 testutil: fix make_container() cleanup
During the work on PR#1752 Florian discovered that make_containers()
is broken for nested containers like:
```
with make_container(tmp_path, {"file1": "file1 from base"}) as base_tag:
    with make_container(tmp_path, {"file1": "file1 from final layer"}, base_tag) as cont_tag:
```
It errors with:
```
Error: 5b947de461ee21b858dd5b4224e80442b2f65b6410189147f2445884d9e4e3d8: image not known
```
The reason is that we work with hashes for the image and then call
`podman image rm` which by default will also remove all dangling
references. Those are defined by not having a tag and not referenced
anymore. So the inner container cleanup also removes the outter.

There are many ways to fix this, I went with re-adding tags to the
test containers because it also makes it easy for the user to see if
we left any containers (accidently) around.
2024-04-25 21:59:40 +02:00
..
__init__.py testutil: fix make_container() cleanup 2024-04-25 21:59:40 +02:00
atomic.py testutil: add AtomicCounter() as a threadsafe counter 2024-04-09 03:02:45 +02:00
imports.py Testutil/importlib: don't write bytecode when importing modules 2024-04-22 16:33:59 +02:00
net.py testutil: skip tests for missing ThreadingHTTPServer in py36 2024-04-16 15:16:49 +02:00