mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 12:51:25 -07:00
better cleanup on task results display (#27175)
* better cleanup on task results display callbacks get 'clean' copy of result objects moved cleanup into result object itself removed now redundant callback cleanup moved no_log tests * moved import as per feedback
This commit is contained in:
parent
03abce2d39
commit
01b6c7c9c6
6 changed files with 64 additions and 19 deletions
|
@ -93,16 +93,6 @@ class TestCallbackDumpResults(unittest.TestCase):
|
|||
self.assertFalse('SENTINEL' in json_out)
|
||||
self.assertTrue('LEFTIN' in json_out)
|
||||
|
||||
def test_no_log(self):
|
||||
cb = CallbackBase()
|
||||
result = {'item': 'some_item',
|
||||
'_ansible_no_log': True,
|
||||
'some_secrets': 'SENTINEL'}
|
||||
json_out = cb._dump_results(result)
|
||||
self.assertFalse('SENTINEL' in json_out)
|
||||
self.assertTrue('no_log' in json_out)
|
||||
self.assertTrue('output has been hidden' in json_out)
|
||||
|
||||
def test_exception(self):
|
||||
cb = CallbackBase()
|
||||
result = {'item': 'some_item LEFTIN',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue