mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Add nxos_command IT and generalize UT (#26617)
* Add nxos_command IT sanity * generalize nxos_command UT for different NXOS platforms
This commit is contained in:
@@ -67,7 +67,7 @@ class TestNxosCommandModule(TestNxosModule):
|
||||
self.assertTrue(result['stdout'][0].startswith('Cisco'))
|
||||
|
||||
def test_nxos_command_wait_for(self):
|
||||
wait_for = 'result[0] contains "Cisco NX-OS"'
|
||||
wait_for = 'result[0] contains "NX-OS"'
|
||||
set_module_args(dict(commands=['show version'], wait_for=wait_for))
|
||||
self.execute_module()
|
||||
|
||||
@@ -91,7 +91,7 @@ class TestNxosCommandModule(TestNxosModule):
|
||||
|
||||
def test_nxos_command_match_all(self):
|
||||
wait_for = ['result[0] contains "Cisco"',
|
||||
'result[0] contains "system image file"']
|
||||
'result[0] contains "image file"']
|
||||
set_module_args(dict(commands=['show version'], wait_for=wait_for, match='all'))
|
||||
self.execute_module()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user