mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
fixes error when trying to run show start over eapi (#26800)
This commit is contained in:
committed by
Ricardo Carrillo Cruz
parent
156b29b26b
commit
3bbb32cac5
@@ -132,3 +132,23 @@ class TestEosConfigModule(TestEosModule):
|
||||
set_module_args(args)
|
||||
result = self.execute_module()
|
||||
self.assertIn('__backup__', result)
|
||||
|
||||
def test_eos_config_save_when(self):
|
||||
mock_run_commands = patch('ansible.modules.network.eos.eos_config.run_commands')
|
||||
run_commands = mock_run_commands.start()
|
||||
|
||||
run_commands.return_value = [load_fixture('eos_config_config.cfg'),
|
||||
load_fixture('eos_config_config.cfg')]
|
||||
|
||||
args = dict(save_when='modified')
|
||||
set_module_args(args)
|
||||
result = self.execute_module()
|
||||
|
||||
run_commands.return_value = [load_fixture('eos_config_config.cfg'),
|
||||
load_fixture('eos_config_config_updated.cfg')]
|
||||
|
||||
args = dict(save_when='modified')
|
||||
set_module_args(args)
|
||||
result = self.execute_module(changed=True)
|
||||
|
||||
mock_run_commands.stop()
|
||||
|
||||
Reference in New Issue
Block a user