Test more action modules

Recent failures of the shell module during Ansible 2.5 testing shows
that we have a test hole there.

Change-Id: I5a63a99ad140b832b0b16e839d4fc2b63bd5cd1b
This commit is contained in:
Tobias Henkel 2018-05-08 21:18:49 +02:00
parent 1e3e5d33fb
commit 7b3fadf17d
4 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,4 @@
- hosts: all
tasks:
- name: Some command
command: echo 123

View File

@ -0,0 +1,4 @@
- hosts: all
tasks:
- name: Some raw command
raw: echo 123

View File

@ -0,0 +1,10 @@
- hosts: all
tasks:
- name: Normal shell
shell: echo 123
- name: Shell with executable
shell: |
echo 123
args:
executable: /bin/bash

View File

@ -92,6 +92,9 @@ class TestActionModules(AnsibleZuulTestCase):
self._run_job('assemble-bad-dir-with-symlink', 'FAILURE',
ERROR_ACCESS_OUTSIDE)
def test_command_module(self):
self._run_job('command-good', 'SUCCESS')
def test_copy_module(self):
self._run_job('copy-good', 'SUCCESS')
@ -133,6 +136,9 @@ class TestActionModules(AnsibleZuulTestCase):
self._run_job('patch-bad', 'FAILURE', ERROR_ACCESS_OUTSIDE)
self._run_job('patch-bad-symlink', 'FAILURE', ERROR_ACCESS_OUTSIDE)
def test_raw_module(self):
self._run_job('raw-good', 'SUCCESS')
def test_script_module(self):
self._run_job('script-good', 'SUCCESS')
@ -145,6 +151,9 @@ class TestActionModules(AnsibleZuulTestCase):
self._run_job('script-bad', 'FAILURE', ERROR_ACCESS_OUTSIDE)
self._run_job('script-bad-symlink', 'FAILURE', ERROR_ACCESS_OUTSIDE)
def test_shell_module(self):
self._run_job('shell-good', 'SUCCESS')
def test_template_module(self):
self._run_job('template-good', 'SUCCESS')