1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove some obsolete tests (mechanism of error detection suboptimal, replacements pending)

This commit is contained in:
Michael DeHaan 2013-10-11 19:28:53 -04:00
parent add45d2ca9
commit e8b043332f
5 changed files with 1 additions and 76 deletions

View file

@ -144,47 +144,6 @@ class TestPlaybook(unittest.TestCase):
result = self.playbook.run()
return result
def test_one(self):
pb = 'test/playbook1.yml'
actual = self._run(pb)
expected = {
"localhost": {
"changed": 9,
"failures": 0,
"ok": 11,
"skipped": 1,
"unreachable": 0
}
}
assert utils.jsonify(expected, format=True) == utils.jsonify(actual,format=True)
# make sure the template module took options from the vars section
data = file('/tmp/ansible_test_data_template.out').read()
assert data.find("ears") != -1, "template success"
def test_task_includes(self):
pb = os.path.join(self.test_dir, 'task-includer.yml')
actual = self._run(pb)
# if different, this will output to screen
print "**ACTUAL**"
print utils.jsonify(actual, format=True)
expected = {
"localhost": {
"changed": 0,
"failures": 0,
"ok": 1,
"skipped": 0,
"unreachable": 0
}
}
print "**EXPECTED**"
print utils.jsonify(expected, format=True)
assert utils.jsonify(expected, format=True) == utils.jsonify(actual,format=True)
def test_playbook_vars(self):
test_callbacks = TestCallbacks()
playbook = ansible.playbook.PlayBook(

View file

@ -277,17 +277,6 @@ class TestUtils(unittest.TestCase):
res = template2.template(None, template, vars)
assert res == 'result'
def test_template_varReplace_iterated(self):
template = 'hello $who'
vars = {
'who': 'oh great $person',
'person': 'one',
}
res = template2.template(None, template, vars)
assert res == u'hello oh great one'
def test_varReplace_include(self):
template = 'hello $FILE(world) $LOOKUP(file, $filename)'

View file

@ -25,7 +25,7 @@
action: command true
- name: test basic shell, plus two ways to dereference a variable
action: shell echo {{HOME}} {{port}}
action: shell echo {{port}}
- name: test vars_files imports
action: shell echo {{duck}} {{cow}} {{testing}}
@ -38,18 +38,6 @@
notify:
- on change 1
# this should trigger two change handlers, but the 2nd should
# not be triggered twice because it's already triggered
- name: test template
action: template src={{item}} dest=/tmp/ansible_test_data_template.out
first_available_file:
- nonexistantfile
- sample.j2
notify:
- on change 1
- on change 2
# there should be various poll events within the range
- name: async poll test

View file

@ -1,2 +0,0 @@
---
- action: debug msg="$internal"

View file

@ -1,9 +0,0 @@
---
- hosts: all
connection: local
gather_facts: no
vars:
- internal: xyz
tasks:
- include: task-included.yml internal=$internal