Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
50da8812
Commit
50da8812
authored
Apr 27, 2015
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up connection plugin test for new_stdin parameter
parent
bf003d31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
v2/test/plugins/test_connection.py
+9
-6
No files found.
v2/test/plugins/test_connection.py
View file @
50da8812
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
from
__future__
import
(
absolute_import
,
division
,
print_function
)
from
__future__
import
(
absolute_import
,
division
,
print_function
)
__metaclass__
=
type
__metaclass__
=
type
from
six
import
StringIO
from
ansible.compat.tests
import
unittest
from
ansible.compat.tests
import
unittest
from
ansible.executor.connection_info
import
ConnectionInformation
from
ansible.executor.connection_info
import
ConnectionInformation
...
@@ -29,7 +31,7 @@ from ansible.plugins.connections import ConnectionBase
...
@@ -29,7 +31,7 @@ from ansible.plugins.connections import ConnectionBase
#from ansible.plugins.connections.jail import Connection as JailConnection
#from ansible.plugins.connections.jail import Connection as JailConnection
#from ansible.plugins.connections.libvirt_lxc import Connection as LibvirtLXCConnection
#from ansible.plugins.connections.libvirt_lxc import Connection as LibvirtLXCConnection
from
ansible.plugins.connections.local
import
Connection
as
LocalConnection
from
ansible.plugins.connections.local
import
Connection
as
LocalConnection
#
from ansible.plugins.connections.paramiko_ssh import Connection as ParamikoConnection
from
ansible.plugins.connections.paramiko_ssh
import
Connection
as
ParamikoConnection
from
ansible.plugins.connections.ssh
import
Connection
as
SSHConnection
from
ansible.plugins.connections.ssh
import
Connection
as
SSHConnection
#from ansible.plugins.connections.winrm import Connection as WinRmConnection
#from ansible.plugins.connections.winrm import Connection as WinRmConnection
...
@@ -37,6 +39,7 @@ class TestConnectionBaseClass(unittest.TestCase):
...
@@ -37,6 +39,7 @@ class TestConnectionBaseClass(unittest.TestCase):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
conn_info
=
ConnectionInformation
()
self
.
conn_info
=
ConnectionInformation
()
self
.
in_stream
=
StringIO
()
def
tearDown
(
self
):
def
tearDown
(
self
):
pass
pass
...
@@ -69,7 +72,7 @@ class TestConnectionBaseClass(unittest.TestCase):
...
@@ -69,7 +72,7 @@ class TestConnectionBaseClass(unittest.TestCase):
pass
pass
def
close
(
self
):
def
close
(
self
):
pass
pass
self
.
assertIsInstance
(
ConnectionModule3
(
self
.
conn_info
),
ConnectionModule3
)
self
.
assertIsInstance
(
ConnectionModule3
(
self
.
conn_info
,
self
.
in_stream
),
ConnectionModule3
)
# def test_accelerate_connection_module(self):
# def test_accelerate_connection_module(self):
# self.assertIsInstance(AccelerateConnection(), AccelerateConnection)
# self.assertIsInstance(AccelerateConnection(), AccelerateConnection)
...
@@ -87,13 +90,13 @@ class TestConnectionBaseClass(unittest.TestCase):
...
@@ -87,13 +90,13 @@ class TestConnectionBaseClass(unittest.TestCase):
# self.assertIsInstance(LibvirtLXCConnection(), LibvirtLXCConnection)
# self.assertIsInstance(LibvirtLXCConnection(), LibvirtLXCConnection)
def
test_local_connection_module
(
self
):
def
test_local_connection_module
(
self
):
self
.
assertIsInstance
(
LocalConnection
(
self
.
conn_info
),
LocalConnection
)
self
.
assertIsInstance
(
LocalConnection
(
self
.
conn_info
,
self
.
in_stream
),
LocalConnection
)
#
def test_paramiko_connection_module(self):
def
test_paramiko_connection_module
(
self
):
# self.assertIsInstance(ParamikoConnection(self.conn_info
), ParamikoConnection)
self
.
assertIsInstance
(
ParamikoConnection
(
self
.
conn_info
,
self
.
in_stream
),
ParamikoConnection
)
def
test_ssh_connection_module
(
self
):
def
test_ssh_connection_module
(
self
):
self
.
assertIsInstance
(
SSHConnection
(
self
.
conn_info
),
SSHConnection
)
self
.
assertIsInstance
(
SSHConnection
(
self
.
conn_info
,
self
.
in_stream
),
SSHConnection
)
# def test_winrm_connection_module(self):
# def test_winrm_connection_module(self):
# self.assertIsInstance(WinRmConnection(), WinRmConnection)
# self.assertIsInstance(WinRmConnection(), WinRmConnection)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment