diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:50:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 06:50:17 +0000 |
commit | 86ed03f8adee56c050c73018537371c230a664a6 (patch) | |
tree | eae3d04cdf1c49848e5a671327ab38297f4acb0d /agents/autodetect/autodetect_test.py | |
parent | Initial commit. (diff) | |
download | fence-agents-86ed03f8adee56c050c73018537371c230a664a6.tar.xz fence-agents-86ed03f8adee56c050c73018537371c230a664a6.zip |
Adding upstream version 4.12.1.upstream/4.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'agents/autodetect/autodetect_test.py')
-rwxr-xr-x | agents/autodetect/autodetect_test.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/agents/autodetect/autodetect_test.py b/agents/autodetect/autodetect_test.py new file mode 100755 index 0000000..a18aaed --- /dev/null +++ b/agents/autodetect/autodetect_test.py @@ -0,0 +1,33 @@ +#!/usr/bin/python + +import unittest +import autodetect as detect + +class TestDetectDevice(unittest.TestCase): + options = {} + + def setUp(self): + self.options = {} + self.options["--ssh-path"] = "/usr/bin/ssh" + self.options["--telnet-path"] = "/usr/bin/telnet" + self.options["--login-timeout"] = "10" + self.options["--shell-timeout"] = "5" + self.options["--power-timeout"] = "10" + self.options["eol"] = "\r\n" + + def test_bladecenter(self): + self.options["--username"] = "rhts" + self.options["--password"] = "100yard-" + self.options["--ip"] = "blade-mm.englab.brq.redhat.com" + + (found_cmd_prompt, conn) = detect.detect_login_telnet(self.options) + res = detect.detect_device(conn, self.options, found_cmd_prompt) + self.assertEqual('fence_bladecenter', res) + + def test_apc5(self): + self.assertEqual('foo', 'foo') + self.options["c"] = "c" + print self.options + +if __name__ == "__main__": + unittest.main() |