diff options
author | Hans Nilsson <[email protected]> | 2016-05-02 13:09:04 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2016-05-02 13:09:04 +0200 |
commit | 4921b2704b761a7dd87a17494a8b8336237a240a (patch) | |
tree | 2e08ed3b14befc71a5f9181fcdfa23c11b6d9581 /lib/ssh/test/ssh_algorithms_SUITE.erl | |
parent | 8a7789a5814dad194310d08dafc4421d22b3c89f (diff) | |
parent | 8bfcd11948895164d1841c0c00450b0e26cb9927 (diff) | |
download | otp-4921b2704b761a7dd87a17494a8b8336237a240a.tar.gz otp-4921b2704b761a7dd87a17494a8b8336237a240a.tar.bz2 otp-4921b2704b761a7dd87a17494a8b8336237a240a.zip |
Merge branch 'hans/ssh/cuddle_tests'
Conflicts:
lib/ssh/test/ssh_algorithms_SUITE.erl
Diffstat (limited to 'lib/ssh/test/ssh_algorithms_SUITE.erl')
-rw-r--r-- | lib/ssh/test/ssh_algorithms_SUITE.erl | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl index 440308d1b3..9910b8f1d7 100644 --- a/lib/ssh/test/ssh_algorithms_SUITE.erl +++ b/lib/ssh/test/ssh_algorithms_SUITE.erl @@ -192,7 +192,7 @@ simple_exec_groups_no_match_too_large(Config) -> %%-------------------------------------------------------------------- %% Testing all default groups -simple_exec_groups() -> [{timetrap,{seconds,180}}]. +simple_exec_groups() -> [{timetrap,{minutes,5}}]. simple_exec_groups(Config) -> Sizes = interpolate( public_key:dh_gex_group_sizes() ), @@ -226,28 +226,13 @@ sshc_simple_exec(Config) -> KnownHosts = filename:join(PrivDir, "known_hosts"), {Host,Port} = ?config(srvr_addr, Config), Cmd = lists:concat(["ssh -p ",Port, - " -C -o UserKnownHostsFile=",KnownHosts, + " -C", + " -o UserKnownHostsFile=",KnownHosts, + " -o StrictHostKeyChecking=no", " ",Host," 1+1."]), ct:log("~p",[Cmd]), - SshPort = open_port({spawn, Cmd}, [binary]), - Expect = <<"2\n">>, - rcv_expected(SshPort, Expect). - - -rcv_expected(SshPort, Expect) -> - receive - {SshPort, {data,Expect}} -> - ct:log("Got expected ~p from ~p",[Expect,SshPort]), - catch port_close(SshPort), - ok; - Other -> - ct:log("Got UNEXPECTED ~p",[Other]), - rcv_expected(SshPort, Expect) - - after ?TIMEOUT -> - catch port_close(SshPort), - ct:fail("Did not receive answer") - end. + OpenSsh = ssh_test_lib:open_port({spawn, Cmd}, [eof,exit_status]), + ssh_test_lib:rcv_expected({data,<<"2\n">>}, OpenSsh, ?TIMEOUT). %%-------------------------------------------------------------------- %% Connect to the ssh server of the OS @@ -366,8 +351,8 @@ start_std_daemon(Opts, Config) -> ct:log("started ~p:~p ~p",[Host,Port,Opts]), [{srvr_pid,Pid},{srvr_addr,{Host,Port}} | Config]. -start_pubkey_daemon(Opts, Config) -> - ct:log("starting pubkey_daemon",[]), +start_pubkey_daemon(Opts0, Config) -> + Opts = [{auth_methods,"publickey"}|Opts0], {Pid, Host, Port} = ssh_test_lib:std_daemon1(Config, Opts), ct:log("started pubkey_daemon ~p:~p ~p",[Host,Port,Opts]), [{srvr_pid,Pid},{srvr_addr,{Host,Port}} | Config]. |