Browse Source

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
changes/07/567007/1
Tobias Henkel 3 years ago
parent
commit
7b3fadf17d
  1. 4
      tests/fixtures/config/remote-action-modules/git/org_project/playbooks/command-good.yaml
  2. 4
      tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-good.yaml
  3. 10
      tests/fixtures/config/remote-action-modules/git/org_project/playbooks/shell-good.yaml
  4. 9
      tests/remote/test_remote_action_modules.py

4
tests/fixtures/config/remote-action-modules/git/org_project/playbooks/command-good.yaml

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

4
tests/fixtures/config/remote-action-modules/git/org_project/playbooks/raw-good.yaml

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

10
tests/fixtures/config/remote-action-modules/git/org_project/playbooks/shell-good.yaml

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

9
tests/remote/test_remote_action_modules.py

@ -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')

Loading…
Cancel
Save