diff options
author | Matt Clay <matt@mystile.com> | 2023-10-03 17:27:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 17:27:55 +0200 |
commit | 20f17687dac23d04cae825254c52cb90befc94d1 (patch) | |
tree | ae1933e8d2f2cd19c2695d142b750b6f866314cd /test | |
parent | Bump sanity test requirements for 3.12 (#81846) (diff) | |
download | ansible-20f17687dac23d04cae825254c52cb90befc94d1.tar.xz ansible-20f17687dac23d04cae825254c52cb90befc94d1.zip |
ansible-test - Invoke container sleep through env (#81853)
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/ansible_test/_internal/host_profiles.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lib/ansible_test/_internal/host_profiles.py b/test/lib/ansible_test/_internal/host_profiles.py index 33bd6640f5..09812456ca 100644 --- a/test/lib/ansible_test/_internal/host_profiles.py +++ b/test/lib/ansible_test/_internal/host_profiles.py @@ -806,6 +806,7 @@ class DockerProfile(ControllerHostProfile[DockerConfig], SshTargetHostProfile[Do - Avoid hanging indefinitely or for an unreasonably long time. NOTE: The container must have a POSIX-compliant default shell "sh" with a non-builtin "sleep" command. + The "sleep" command is invoked through "env" to avoid using a shell builtin "sleep" (if present). """ command = '' @@ -813,7 +814,7 @@ class DockerProfile(ControllerHostProfile[DockerConfig], SshTargetHostProfile[Do command += f'{init_config.command} && ' if sleep or init_config.command_privileged: - command += 'sleep 60 ; ' + command += 'env sleep 60 ; ' if not command: return None |