Revert "Fix copyUIDGID parameter inversion in Docker compat API"

This reverts commit 2b848cca36.

The official Docker API documentation was misleading here.
Testing shown that old podman behaviour was correct.
In docker copyUIDGID=true means that primary container uid/gid is used,
not the uid/gid from the tar stream.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
This commit is contained in:
Matej Vašek
2025-11-13 22:45:17 +01:00
parent d3c5c5d219
commit 65411d53c9
3 changed files with 4 additions and 51 deletions

View File

@@ -191,8 +191,7 @@ class TestContainers(common.DockerTestCase):
ret, out = ctr.exec_run(["stat", "-c", "%u:%g", "/tmp/a.txt"])
self.assertEqual(ret, 0)
# Docker-py implementation of put_archive dont do request with copyUIDGID=true
self.assertEqual(out.rstrip(), b"0:0", "UID/GID of copied file")
self.assertEqual(out.rstrip(), b"1042:1043", "UID/GID of copied file")
ret, out = ctr.exec_run(["cat", "/tmp/a.txt"])
self.assertEqual(ret, 0)