@@ -47,6 +47,30 @@ def test_podman(exec_container: Callable[[str], subprocess.CompletedProcess[str]
47
47
assert result .returncode == 0 , "podman command failed"
48
48
49
49
50
+ @pytest .mark .container ()
51
+ def test_container_in_container (
52
+ exec_container : Callable [[str ], subprocess .CompletedProcess [str ]],
53
+ ) -> None :
54
+ """Test podman container-in-container functionality for plugin copy.
55
+
56
+ Args:
57
+ exec_container: The container executor.
58
+ """
59
+ podman_run_container = exec_container (
60
+ "podman run -i --rm -d -e ANSIBLE_DEV_TOOLS_CONTAINER=1"
61
+ " -e ANSIBLE_FORCE_COLOR=0 --name ghcr_io_ansible_community_ansible_dev_tools_latest"
62
+ " ghcr.io/ansible/community-ansible-dev-tools:latest bash" ,
63
+ )
64
+ assert podman_run_container .returncode == 0
65
+
66
+ test_path_access = exec_container (
67
+ "podman exec ghcr_io_ansible_community_ansible_dev_tools_latest"
68
+ " ls /usr/local/lib/python3.12/site-packages/ansible/plugins/" ,
69
+ )
70
+ assert "OCI permission denied" not in test_path_access .stdout
71
+ assert test_path_access .returncode == 0
72
+
73
+
50
74
@pytest .mark .container ()
51
75
@pytest .mark .parametrize ("app" , ("nano" , "tar" , "vi" ))
52
76
def test_app (exec_container : Callable [[str ], subprocess .CompletedProcess [str ]], app : str ) -> None :
0 commit comments