aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2012-11-28 15:23:18 +0100
committerFredrik Gustafsson <[email protected]>2012-11-28 15:23:18 +0100
commit0935ad3069a1372e40cf20631ede94181ef01353 (patch)
treeb8b7f6e083a43b841212ae2e2732870f116129a3 /lib
parent3b697a2e0de3dc02461d811b8714ad91470b9e2c (diff)
downloadotp-0935ad3069a1372e40cf20631ede94181ef01353.tar.gz
otp-0935ad3069a1372e40cf20631ede94181ef01353.tar.bz2
otp-0935ad3069a1372e40cf20631ede94181ef01353.zip
Changed testcases to proper sftpd listening
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh/test/ssh_sftpd_SUITE.erl18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl
index 9877d39ec4..2f81e89433 100644
--- a/lib/ssh/test/ssh_sftpd_SUITE.erl
+++ b/lib/ssh/test/ssh_sftpd_SUITE.erl
@@ -107,19 +107,17 @@ init_per_testcase(TestCase, Config) ->
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}]},
+ {pwdfun, fun(_,_) -> true end}],
{ok, Sftpd} = case TestCase of
ver6_basic ->
- ssh_sftpd:listen(Port, [{system_dir, SystemDir},
- {user_dir, PrivDir},
- {user_passwords,[{?USER, ?PASSWD}]},
- {pwdfun, fun(_,_) -> true end},
- {sftpd_vsn, 6}]);
+ SubSystems = [ssh_sftpd:subsystem_spec([{sftpd_vsn, 6}])],
+ ssh:daemon(Port, [{subsystems, SubSystems}|Options]);
_ ->
- ssh_sftpd:listen(Port, [{system_dir, SystemDir},
- {user_dir, PrivDir},
- {user_passwords,[{?USER, ?PASSWD}]},
- {pwdfun, fun(_,_) -> true end}])
+ SubSystems = [ssh_sftpd:subsystem_spec([])],
+ ssh:daemon(Port, [{subsystems, SubSystems}|Options])
end,
Cm = ssh_test_lib:connect(Port,