mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-15 17:40:50 -07:00
fixes error when trying to run show start over eapi (#26800)
This commit is contained in:
parent
156b29b26b
commit
3bbb32cac5
3 changed files with 54 additions and 7 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue