aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_test_lib.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-03-03 14:17:10 +0100
committerHans Nilsson <[email protected]>2017-04-07 10:19:56 +0200
commit26fffbb94ec15646235f1ba91aa3afcfb9711daa (patch)
tree43819cdcb5d3c4aec9f4793f68062aaa8e72be27 /lib/ssh/test/ssh_test_lib.erl
parenta005cc758490a1fa04119e747534eddbd76c4223 (diff)
downloadotp-26fffbb94ec15646235f1ba91aa3afcfb9711daa.tar.gz
otp-26fffbb94ec15646235f1ba91aa3afcfb9711daa.tar.bz2
otp-26fffbb94ec15646235f1ba91aa3afcfb9711daa.zip
ssh: Test-suites beautifications
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r--lib/ssh/test/ssh_test_lib.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index 1673f52821..0ada8233a7 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -64,6 +64,9 @@ daemon(Host, Port, Options) ->
Error
end.
+daemon_port(Pid) -> daemon_port(0, Pid).
+
+
daemon_port(0, Pid) -> {ok,Dinf} = ssh:daemon_info(Pid),
proplists:get_value(port, Dinf);
daemon_port(Port, _) -> Port.