Merge pull request #175 from Qalthos/fix_tests
Move check_mode setting to the proper location SUMMARY ISSUE TYPE Test Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Nilashish Chakraborty <nilashishchakraborty8@gmail.com>pull/131/head^2
commit
49a2a39da8
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
trivial:
|
||||||
|
- check_mode has been removed from play_context, set on task instead for unit tests
|
|
@ -44,6 +44,7 @@ Parameters
|
||||||
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
|
||||||
<div style="font-size: small">
|
<div style="font-size: small">
|
||||||
<span style="color: purple">list</span>
|
<span style="color: purple">list</span>
|
||||||
|
/ <span style="color: purple">elements=raw</span>
|
||||||
/ <span style="color: red">required</span>
|
/ <span style="color: red">required</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -25,7 +25,10 @@ except ImportError:
|
||||||
class TestUpdate_Fact(unittest.TestCase):
|
class TestUpdate_Fact(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
task = MagicMock(Task)
|
task = MagicMock(Task)
|
||||||
|
# Ansible > 2.13 looks for check_mode in task
|
||||||
|
task.check_mode = False
|
||||||
play_context = MagicMock()
|
play_context = MagicMock()
|
||||||
|
# Ansible <= 2.13 looks for check_mode in play_context
|
||||||
play_context.check_mode = False
|
play_context.check_mode = False
|
||||||
connection = MagicMock()
|
connection = MagicMock()
|
||||||
fake_loader = {}
|
fake_loader = {}
|
||||||
|
|
|
@ -81,7 +81,10 @@ INVALID_JINJA = [
|
||||||
class TestUpdate_Fact(unittest.TestCase):
|
class TestUpdate_Fact(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
task = MagicMock(Task)
|
task = MagicMock(Task)
|
||||||
|
# Ansible > 2.13 looks for check_mode in task
|
||||||
|
task.check_mode = False
|
||||||
play_context = MagicMock()
|
play_context = MagicMock()
|
||||||
|
# Ansible <= 2.13 looks for check_mode in play_context
|
||||||
play_context.check_mode = False
|
play_context.check_mode = False
|
||||||
connection = MagicMock()
|
connection = MagicMock()
|
||||||
fake_loader = {}
|
fake_loader = {}
|
||||||
|
|
Loading…
Reference in New Issue