mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Config continued (#31024)
* included inventory and callback in new config allow inventory to be configurable updated connection options settings also updated winrm to work with new configs removed now obsolete set_host_overrides added notes for future bcoca, current one is just punting, it's future's problem updated docs per feedback added remove group/host methods to inv data moved fact cache from data to constructed cleaner/better options fix when vars are added extended ignore list to config dicts updated paramiko connection docs removed options from base that paramiko already handles left the look option as it is used by other plugin types resolve delegation updated cache doc options fixed test_script better fragment merge for options fixed proxy command restore ini for proxy normalized options moved pipelining to class updates for host_key_checking restructured mixins * fix typo
This commit is contained in:
parent
46c4f6311a
commit
23b1dbacaf
32 changed files with 667 additions and 366 deletions
|
@ -35,7 +35,7 @@ from ansible.plugins.connection import network_cli
|
|||
|
||||
class TestConnectionClass(unittest.TestCase):
|
||||
|
||||
@patch("ansible.plugins.connection.network_cli.ParamikoSshConnection._connect")
|
||||
@patch("ansible.plugins.connection.paramiko_ssh.Connection._connect")
|
||||
def test_network_cli__connect_error(self, mocked_super):
|
||||
pc = PlayContext()
|
||||
new_stdin = StringIO()
|
||||
|
@ -47,7 +47,7 @@ class TestConnectionClass(unittest.TestCase):
|
|||
pc.network_os = None
|
||||
self.assertRaises(AnsibleConnectionFailure, conn._connect)
|
||||
|
||||
@patch("ansible.plugins.connection.network_cli.ParamikoSshConnection._connect")
|
||||
@patch("ansible.plugins.connection.paramiko_ssh.Connection._connect")
|
||||
def test_network_cli__invalid_os(self, mocked_super):
|
||||
pc = PlayContext()
|
||||
new_stdin = StringIO()
|
||||
|
@ -60,7 +60,7 @@ class TestConnectionClass(unittest.TestCase):
|
|||
self.assertRaises(AnsibleConnectionFailure, conn._connect)
|
||||
|
||||
@patch("ansible.plugins.connection.network_cli.terminal_loader")
|
||||
@patch("ansible.plugins.connection.network_cli.ParamikoSshConnection._connect")
|
||||
@patch("ansible.plugins.connection.paramiko_ssh.Connection._connect")
|
||||
def test_network_cli__connect(self, mocked_super, mocked_terminal_loader):
|
||||
pc = PlayContext()
|
||||
new_stdin = StringIO()
|
||||
|
@ -84,7 +84,7 @@ class TestConnectionClass(unittest.TestCase):
|
|||
conn._connect()
|
||||
conn._terminal.on_authorize.assert_called_with(passwd='password')
|
||||
|
||||
@patch("ansible.plugins.connection.network_cli.ParamikoSshConnection.close")
|
||||
@patch("ansible.plugins.connection.paramiko_ssh.Connection.close")
|
||||
def test_network_cli_close(self, mocked_super):
|
||||
pc = PlayContext()
|
||||
new_stdin = StringIO()
|
||||
|
@ -99,7 +99,7 @@ class TestConnectionClass(unittest.TestCase):
|
|||
self.assertTrue(terminal.on_close_shell.called)
|
||||
self.assertIsNone(conn._ssh_shell)
|
||||
|
||||
@patch("ansible.plugins.connection.network_cli.ParamikoSshConnection._connect")
|
||||
@patch("ansible.plugins.connection.paramiko_ssh.Connection._connect")
|
||||
def test_network_cli_exec_command(self, mocked_super):
|
||||
pc = PlayContext()
|
||||
new_stdin = StringIO()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue