diff options
author | Hans Nilsson <[email protected]> | 2015-10-07 12:15:08 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2015-10-07 12:52:14 +0200 |
commit | ca0aef835dba5ef2c4185289092ed0fc2f1bb2ba (patch) | |
tree | 2d496c35b5c8e31a03973eeb22d73ab69cd77693 /lib/ssh/test/ssh_test_lib.erl | |
parent | f8f1bf3326e98bff7dbfed6f284b136b799c0be4 (diff) | |
download | otp-ca0aef835dba5ef2c4185289092ed0fc2f1bb2ba.tar.gz otp-ca0aef835dba5ef2c4185289092ed0fc2f1bb2ba.tar.bz2 otp-ca0aef835dba5ef2c4185289092ed0fc2f1bb2ba.zip |
ssh: added dh_gex tests
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r-- | lib/ssh/test/ssh_test_lib.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl index e16df6f959..f1e1a51c00 100644 --- a/lib/ssh/test/ssh_test_lib.erl +++ b/lib/ssh/test/ssh_test_lib.erl @@ -93,9 +93,12 @@ std_connect(Config, Host, Port, ExtraOpts) -> | ExtraOpts]). std_simple_sftp(Host, Port, Config) -> + std_simple_sftp(Host, Port, Config, []). + +std_simple_sftp(Host, Port, Config, Opts) -> UserDir = ?config(priv_dir, Config), DataFile = filename:join(UserDir, "test.data"), - ConnectionRef = ssh_test_lib:std_connect(Config, Host, Port, []), + ConnectionRef = ssh_test_lib:std_connect(Config, Host, Port, Opts), {ok, ChannelRef} = ssh_sftp:start_channel(ConnectionRef), Data = crypto:rand_bytes(proplists:get_value(std_simple_sftp_size,Config,10)), ok = ssh_sftp:write_file(ChannelRef, DataFile, Data), @@ -104,7 +107,10 @@ std_simple_sftp(Host, Port, Config) -> Data == ReadData. std_simple_exec(Host, Port, Config) -> - ConnectionRef = ssh_test_lib:std_connect(Config, Host, Port, []), + std_simple_exec(Host, Port, Config, []). + +std_simple_exec(Host, Port, Config, Opts) -> + ConnectionRef = ssh_test_lib:std_connect(Config, Host, Port, Opts), {ok, ChannelId} = ssh_connection:session_channel(ConnectionRef, infinity), success = ssh_connection:exec(ConnectionRef, ChannelId, "23+21-2.", infinity), Data = {ssh_cm, ConnectionRef, {data, ChannelId, 0, <<"42\n">>}}, |