From 8a754e0858d922e955e71b253c139e071ecec432 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 18:04:21 +0200 Subject: Adding upstream version 2.14.3. Signed-off-by: Daniel Baumann --- .../connection_plugins/test_connection_default.py | 41 +++++++++++++++++++++ .../connection_plugins/test_connection_override.py | 42 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 test/integration/targets/shell/connection_plugins/test_connection_default.py create mode 100644 test/integration/targets/shell/connection_plugins/test_connection_override.py (limited to 'test/integration/targets/shell/connection_plugins') diff --git a/test/integration/targets/shell/connection_plugins/test_connection_default.py b/test/integration/targets/shell/connection_plugins/test_connection_default.py new file mode 100644 index 0000000..60feedd --- /dev/null +++ b/test/integration/targets/shell/connection_plugins/test_connection_default.py @@ -0,0 +1,41 @@ +# Copyright (c) 2019 Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +DOCUMENTATION = ''' +connection: test_connection_default +short_description: test connection plugin used in tests +description: +- This is a test connection plugin used for shell testing +author: ansible (@core) +version_added: historical +options: +''' + +from ansible.plugins.connection import ConnectionBase + + +class Connection(ConnectionBase): + ''' test connnection ''' + + transport = 'test_connection_default' + + def __init__(self, *args, **kwargs): + super(Connection, self).__init__(*args, **kwargs) + + def _connect(self): + pass + + def exec_command(self, cmd, in_data=None, sudoable=True): + pass + + def put_file(self, in_path, out_path): + pass + + def fetch_file(self, in_path, out_path): + pass + + def close(self): + pass diff --git a/test/integration/targets/shell/connection_plugins/test_connection_override.py b/test/integration/targets/shell/connection_plugins/test_connection_override.py new file mode 100644 index 0000000..d26d2b5 --- /dev/null +++ b/test/integration/targets/shell/connection_plugins/test_connection_override.py @@ -0,0 +1,42 @@ +# Copyright (c) 2019 Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + +DOCUMENTATION = ''' +connection: test_connection_override +short_description: test connection plugin used in tests +description: +- This is a test connection plugin used for shell testing +author: ansible (@core) +version_added: historical +options: +''' + +from ansible.plugins.connection import ConnectionBase + + +class Connection(ConnectionBase): + ''' test connection ''' + + transport = 'test_connection_override' + + def __init__(self, *args, **kwargs): + self._shell_type = 'powershell' # Set a shell type that is not sh + super(Connection, self).__init__(*args, **kwargs) + + def _connect(self): + pass + + def exec_command(self, cmd, in_data=None, sudoable=True): + pass + + def put_file(self, in_path, out_path): + pass + + def fetch_file(self, in_path, out_path): + pass + + def close(self): + pass -- cgit v1.2.3