blob: a91a2f8ab6cda9fb62d660338d349766cdc3f9c5 [file] [log] [blame]
#!/usr/bin/python3
# Copyright 2016 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import common
from autotest_lib.server.hosts import ssh_multiplex
class ConnectionPoolTest(unittest.TestCase):
""" Test for SSH Connection Pool """
def test_get(self):
""" We can get MainSsh object for a host from the pool """
p = ssh_multiplex.ConnectionPool()
conn1 = p.get('host', 'user', 22)
self.assertIsNotNone(conn1)
conn2 = p.get('host', 'user', 22)
self.assertEquals(conn1, conn2)
if __name__ == '__main__':
unittest.main()