From e8b043332f047660689876b035e0d1c06f89bd94 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Fri, 11 Oct 2013 19:28:53 -0400 Subject: [PATCH] Remove some obsolete tests (mechanism of error detection suboptimal, replacements pending) --- test/TestPlayBook.py | 41 ----------------------------------------- test/TestUtils.py | 11 ----------- test/playbook1.yml | 14 +------------- test/task-included.yml | 2 -- test/task-includer.yml | 9 --------- 5 files changed, 1 insertion(+), 76 deletions(-) delete mode 100644 test/task-included.yml delete mode 100644 test/task-includer.yml diff --git a/test/TestPlayBook.py b/test/TestPlayBook.py index 9fed431987..8a4ceb9584 100644 --- a/test/TestPlayBook.py +++ b/test/TestPlayBook.py @@ -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( diff --git a/test/TestUtils.py b/test/TestUtils.py index 4f5c97bc88..4c8f681f09 100644 --- a/test/TestUtils.py +++ b/test/TestUtils.py @@ -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)' diff --git a/test/playbook1.yml b/test/playbook1.yml index d345d7428d..f2c3436c78 100644 --- a/test/playbook1.yml +++ b/test/playbook1.yml @@ -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 diff --git a/test/task-included.yml b/test/task-included.yml deleted file mode 100644 index 0c68a12074..0000000000 --- a/test/task-included.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -- action: debug msg="$internal" diff --git a/test/task-includer.yml b/test/task-includer.yml deleted file mode 100644 index b728827f72..0000000000 --- a/test/task-includer.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- hosts: all - connection: local - gather_facts: no - vars: - - internal: xyz - - tasks: - - include: task-included.yml internal=$internal