forked from ansible/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better backwards compat handling of status
restored 'rc' inspection but only when failed is not specified removed redundant changed from basic.py as task_executor already adds removed redundant filters, they are tests added aliases to tests removed from filters fixed test to new rc handling
- Loading branch information
Showing
6 changed files
with
36 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ def test_exit_json_no_args_exits(self): | |
else: | ||
self.assertEquals(ctx.exception.code, 0) | ||
return_val = json.loads(self.fake_stream.getvalue()) | ||
self.assertEquals(return_val, dict(changed=False, invocation=empty_invocation)) | ||
self.assertEquals(return_val, dict(invocation=empty_invocation)) | ||
|
||
def test_exit_json_args_exits(self): | ||
with self.assertRaises(SystemExit) as ctx: | ||
|
@@ -70,7 +70,7 @@ def test_exit_json_args_exits(self): | |
else: | ||
self.assertEquals(ctx.exception.code, 0) | ||
return_val = json.loads(self.fake_stream.getvalue()) | ||
self.assertEquals(return_val, dict(msg="message", changed=False, invocation=empty_invocation)) | ||
self.assertEquals(return_val, dict(msg="message", invocation=empty_invocation)) | ||
|
||
def test_fail_json_exits(self): | ||
with self.assertRaises(SystemExit) as ctx: | ||
|
@@ -81,7 +81,7 @@ def test_fail_json_exits(self): | |
else: | ||
self.assertEquals(ctx.exception.code, 1) | ||
return_val = json.loads(self.fake_stream.getvalue()) | ||
self.assertEquals(return_val, dict(msg="message", changed=False, failed=True, invocation=empty_invocation)) | ||
self.assertEquals(return_val, dict(msg="message", failed=True, invocation=empty_invocation)) | ||
|
||
def test_exit_json_proper_changed(self): | ||
with self.assertRaises(SystemExit) as ctx: | ||
|
@@ -98,23 +98,23 @@ class TestAnsibleModuleExitValuesRemoved(unittest.TestCase): | |
dict(one=1, pwd='$ecret k3y', url='https://username:[email protected]/login/', | ||
not_secret='following the leader', msg='here'), | ||
dict(one=1, pwd=OMIT, url='https://username:[email protected]/login/', | ||
not_secret='following the leader', changed=False, msg='here', | ||
not_secret='following the leader', msg='here', | ||
invocation=dict(module_args=dict(password=OMIT, token=None, username='person'))), | ||
), | ||
( | ||
dict(username='person', password='password12345'), | ||
dict(one=1, pwd='$ecret k3y', url='https://username:[email protected]/login/', | ||
not_secret='following the leader', msg='here'), | ||
dict(one=1, pwd='$ecret k3y', url='https://username:********@foo.com/login/', | ||
not_secret='following the leader', changed=False, msg='here', | ||
not_secret='following the leader', msg='here', | ||
invocation=dict(module_args=dict(password=OMIT, token=None, username='person'))), | ||
), | ||
( | ||
dict(username='person', password='$ecret k3y'), | ||
dict(one=1, pwd='$ecret k3y', url='https://username:$ecret [email protected]/login/', | ||
not_secret='following the leader', msg='here'), | ||
dict(one=1, pwd=OMIT, url='https://username:********@foo.com/login/', | ||
not_secret='following the leader', changed=False, msg='here', | ||
not_secret='following the leader', msg='here', | ||
invocation=dict(module_args=dict(password=OMIT, token=None, username='person'))), | ||
), | ||
) | ||
|