diff options
author | Zuul <zuul@review.opendev.org> | 2020-07-21 20:52:48 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-07-21 20:52:48 +0000 |
commit | 713b533d42f0d6e8112be4fd7c925ce0e6128a0e (patch) | |
tree | d4f0af82afd75955b56285d70d92e1411142ccf7 /tests/remote/test_remote_action_modules.py | |
parent | c02f88192e871a2907a58704527db31a9bbad4e9 (diff) | |
parent | 49fe527edb2c27f67c074be72e3fb6d665400de7 (diff) | |
download | zuul-713b533d42f0d6e8112be4fd7c925ce0e6128a0e.tar.gz |
Merge "Block localhost shell tasks in untrusted playbooks" into stable/3.x
Diffstat (limited to 'tests/remote/test_remote_action_modules.py')
-rw-r--r-- | tests/remote/test_remote_action_modules.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/remote/test_remote_action_modules.py b/tests/remote/test_remote_action_modules.py index c5818ae9c..23833f174 100644 --- a/tests/remote/test_remote_action_modules.py +++ b/tests/remote/test_remote_action_modules.py @@ -18,6 +18,7 @@ import textwrap from tests.base import AnsibleZuulTestCase, FIXTURE_DIR ERROR_ACCESS_OUTSIDE = "Accessing files from outside the working dir" +ERROR_LOCAL_CODE = "Executing local code is prohibited" ERROR_SYNC_TO_OUTSIDE = "Syncing files to outside the working dir" ERROR_SYNC_FROM_OUTSIDE = "Syncing files from outside the working dir" ERROR_SYNC_RSH = "Using custom synchronize rsh is prohibited" @@ -175,6 +176,8 @@ class FunctionalActionModulesMixIn: def test_shell_module(self): self._run_job('shell-good', 'SUCCESS') + self._run_job('shell-localhost', 'FAILURE', ERROR_LOCAL_CODE) + self._run_job('shell-delegate', 'FAILURE', ERROR_LOCAL_CODE) def test_synchronize_module(self): self._run_job('synchronize-good', 'SUCCESS') |