aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_sftpd_SUITE.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-05-02 13:10:11 +0200
committerHans Nilsson <[email protected]>2016-05-02 13:10:11 +0200
commit857a1d4b17508608241e10315f17988cf2d22ecc (patch)
tree3542e6dee0f802baae8bcb0ed7100c89b3b331b0 /lib/ssh/test/ssh_sftpd_SUITE.erl
parent7cc731c30c4701251fec17d93a88ce2a8739b5b1 (diff)
parent6282a81eca93e015445e04d09be9ac7854bb96d6 (diff)
downloadotp-857a1d4b17508608241e10315f17988cf2d22ecc.tar.gz
otp-857a1d4b17508608241e10315f17988cf2d22ecc.tar.bz2
otp-857a1d4b17508608241e10315f17988cf2d22ecc.zip
Merge branch 'hans/ssh/daemon_port_0/OTP-13527'
Conflicts: lib/ssh/test/ssh_test_lib.erl
Diffstat (limited to 'lib/ssh/test/ssh_sftpd_SUITE.erl')
-rw-r--r--lib/ssh/test/ssh_sftpd_SUITE.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl
index fb1a9687af..9385bd127d 100644
--- a/lib/ssh/test/ssh_sftpd_SUITE.erl
+++ b/lib/ssh/test/ssh_sftpd_SUITE.erl
@@ -105,7 +105,6 @@ init_per_testcase(TestCase, Config) ->
ClientUserDir = filename:join(PrivDir, nopubkey),
SystemDir = filename:join(?config(priv_dir, Config), system),
- Port = ssh_test_lib:inet_port(node()),
Options = [{system_dir, SystemDir},
{user_dir, PrivDir},
{user_passwords,[{?USER, ?PASSWD}]},
@@ -113,11 +112,13 @@ init_per_testcase(TestCase, Config) ->
{ok, Sftpd} = case TestCase of
ver6_basic ->
SubSystems = [ssh_sftpd:subsystem_spec([{sftpd_vsn, 6}])],
- ssh:daemon(Port, [{subsystems, SubSystems}|Options]);
+ ssh:daemon(0, [{subsystems, SubSystems}|Options]);
_ ->
SubSystems = [ssh_sftpd:subsystem_spec([])],
- ssh:daemon(Port, [{subsystems, SubSystems}|Options])
+ ssh:daemon(0, [{subsystems, SubSystems}|Options])
end,
+ {ok,Dinf} = ssh:daemon_info(Sftpd),
+ Port = proplists:get_value(port, Dinf),
Cm = ssh_test_lib:connect(Port,
[{user_dir, ClientUserDir},