Commit 9985995a by Michael DeHaan

Make tests use the local connection type, fix missing callback in tests.

parent 75620220
......@@ -22,6 +22,9 @@ class TestCallbacks(object):
def set_playbook(self, playbook):
self.playbook = playbook
def on_no_hosts_remaining(self):
pass
def on_start(self):
EVENTS.append('start')
......
......@@ -35,6 +35,7 @@ class TestRunner(unittest.TestCase):
forks=1,
background=0,
pattern='all',
transport='local',
)
self.cwd = os.getcwd()
self.test_dir = os.path.join(self.cwd, 'test')
......
---
- hosts: aliasgroup
connection: local
vars:
test_file: /tmp/ansible-alias-test
tasks:
......@@ -9,6 +10,7 @@
- action: command removes=$test_file rm -f $test_file
- hosts: all
connection: local
gather_facts: False
tasks:
- action: command true
......
# Test that playbooks support YAML lists of hosts.
---
- hosts: [host1, host2, host3]
connection: local
tasks:
- action: command true
# simple test of lookup plugins in with_*
---
- hosts: all
connection: local
vars:
empty_list: []
tasks:
......
---
- hosts: all
connection: local
gather_facts: False
tasks:
- action: debug msg="$variable"
- hosts: all
connection: local
vars:
- ugly: var
gather_facts: False
......
# extremely simple test of the most basic of playbook engine/functions
---
- hosts: all
connection: local
# the 'weasels' string should show up in the output
......
---
# Test iterating over lines of stdout stored in a register.
- hosts: localhost
connection: local
vars:
small_file: /etc/resolv.conf
temp_file: /tmp/ansible_result_list.tmp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment