mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
* Fix Issue #39598 Signed-off-by: Anas Badaha <anasb@mellanox.com> * Fix unit test for onyx_config Signed-off-by: Anas Badaha <anasb@mellanox.com> * Add comments for save running config Signed-off-by: Anas Badaha <anasb@mellanox.com> * Enhance onyx_config bug fix Signed-off-by: Anas Badaha <anasb@mellanox.com> * Fix result['changed'] = True comment Signed-off-by: Anas Badaha <anasb@mellanox.com>
This commit is contained in:
committed by
Ganesh Nalawade
parent
6178a55afd
commit
d2446cbf0f
@@ -71,12 +71,12 @@ class TestOnyxConfigModule(TestOnyxModule):
|
||||
self.assertIn('__backup__', result)
|
||||
|
||||
def test_onyx_config_save(self):
|
||||
set_module_args(dict(save='yes'))
|
||||
set_module_args(dict(lines=['hostname foo'], save='yes'))
|
||||
self.execute_module(changed=True)
|
||||
self.assertEqual(self.run_commands.call_count, 1)
|
||||
self.assertEqual(self.run_commands.call_count, 0)
|
||||
self.assertEqual(self.get_config.call_count, 1)
|
||||
self.assertEqual(self.load_config.call_count, 0)
|
||||
args = self.run_commands.call_args[0][1]
|
||||
self.assertEqual(self.load_config.call_count, 1)
|
||||
args = self.load_config.call_args[0][1]
|
||||
self.assertIn('configuration write', args)
|
||||
|
||||
def test_onyx_config_lines_wo_parents(self):
|
||||
|
||||
Reference in New Issue
Block a user