mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 14:21:26 -07:00
Fix ios_user issues (#44904)
* Fix ios_user issues * Modify regex and fix unittests
This commit is contained in:
parent
7d81de2516
commit
0f268e70a1
3 changed files with 18 additions and 27 deletions
|
@ -61,10 +61,7 @@ class TestIosUserModule(TestIosModule):
|
|||
{
|
||||
"command": "no username ansible", "answer": "y", "newline": False,
|
||||
"prompt": "This operation will remove all username related configurations with same name",
|
||||
},
|
||||
'ip ssh pubkey-chain',
|
||||
' no username ansible',
|
||||
' exit'
|
||||
}
|
||||
]
|
||||
|
||||
result_cmd = []
|
||||
|
@ -124,11 +121,10 @@ class TestIosUserModule(TestIosModule):
|
|||
set_module_args(dict(name='ansible', sshkey='dGVzdA=='))
|
||||
commands = [
|
||||
'ip ssh pubkey-chain',
|
||||
' no username ansible',
|
||||
' username ansible',
|
||||
' key-hash ssh-rsa 098F6BCD4621D373CADE4E832627B4F6',
|
||||
' exit',
|
||||
' exit'
|
||||
'username ansible',
|
||||
'key-hash ssh-rsa 098F6BCD4621D373CADE4E832627B4F6',
|
||||
'exit',
|
||||
'exit'
|
||||
]
|
||||
result = self.execute_module(changed=True, commands=commands)
|
||||
self.assertEqual(result['commands'], commands)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue