aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-07-02 12:56:59 +0200
committerHans Nilsson <[email protected]>2015-08-03 13:40:34 +0200
commitb87115416297a57f8e303c6bc75483f943ea4954 (patch)
tree00c921beacfed3db136ed4298c1a3c6e58e9b714
parent2a9f5054f89ca02c1a35dcb96c3ad747663afd51 (diff)
downloadotp-b87115416297a57f8e303c6bc75483f943ea4954.tar.gz
otp-b87115416297a57f8e303c6bc75483f943ea4954.tar.bz2
otp-b87115416297a57f8e303c6bc75483f943ea4954.zip
ssh: add test group
-rw-r--r--lib/ssh/test/ssh_sftp_SUITE.erl28
1 files changed, 22 insertions, 6 deletions
diff --git a/lib/ssh/test/ssh_sftp_SUITE.erl b/lib/ssh/test/ssh_sftp_SUITE.erl
index 86ab503c20..a95e16a0b3 100644
--- a/lib/ssh/test/ssh_sftp_SUITE.erl
+++ b/lib/ssh/test/ssh_sftp_SUITE.erl
@@ -65,6 +65,7 @@ groups() ->
[{not_unicode, [], [{group,erlang_server},
{group,openssh_server},
{group,'diffie-hellman-group-exchange-sha1'},
+ {group,'diffie-hellman-group-exchange-sha256'},
sftp_nonexistent_subsystem]},
{unicode, [], [{group,erlang_server},
@@ -74,6 +75,9 @@ groups() ->
{'diffie-hellman-group-exchange-sha1', [], [{group,erlang_server},
{group,openssh_server}]},
+ {'diffie-hellman-group-exchange-sha256', [], [{group,erlang_server},
+ {group,openssh_server}]},
+
{erlang_server, [], [{group,write_read_tests},
version_option,
{group,remote_tar}]},
@@ -165,7 +169,7 @@ init_per_group(openssh_server, Config) ->
ssh:close(Connection),
[{peer, {fmt_host(IPx),Portx}}, {group, openssh_server} | Config];
{error,"Key exchange failed"} ->
- {skip, "openssh server lacks 'diffie-hellman-group-exchange-sha1'"};
+ {skip, "openssh server doesn't support the tested kex algorithm"};
_ ->
{skip, "No openssh server"}
end;
@@ -204,6 +208,17 @@ init_per_group('diffie-hellman-group-exchange-sha1', Config) ->
{skip,"'diffie-hellman-group-exchange-sha1' not supported by this version of erlang ssh"}
end;
+init_per_group('diffie-hellman-group-exchange-sha256', Config) ->
+ case lists:member('diffie-hellman-group-exchange-sha256',
+ ssh_transport:supported_algorithms(kex)) of
+ true ->
+ [{extra_opts, [{preferred_algorithms, [{kex,['diffie-hellman-group-exchange-sha256']}]}]}
+ | Config];
+
+ false ->
+ {skip,"'diffie-hellman-group-exchange-sha256' not supported by this version of erlang ssh"}
+ end;
+
init_per_group(write_read_tests, Config) ->
ct:comment("Begin ~p",[grps(Config)]),
Config.
@@ -246,11 +261,12 @@ init_per_testcase(version_option, Config) ->
Passwd = ?config(passwd, Config),
{ok, ChannelPid, Connection} =
ssh_sftp:start_channel(Host, Port,
- [{sftp_vsn, 3},
- {user, User},
- {password, Passwd},
- {user_interaction, false},
- {silently_accept_hosts, true}]),
+ extra_opts(Config) ++
+ [{sftp_vsn, 3},
+ {user, User},
+ {password, Passwd},
+ {user_interaction, false},
+ {silently_accept_hosts, true}]),
Sftp = {ChannelPid, Connection},
[{sftp,Sftp}, {watchdog, Dog} | TmpConfig];