From 076cdc73631cc46b250f69cedd30fcabaec3d044 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 14 Apr 2016 14:00:24 +0200 Subject: ssh: force publickey in some tests in ssh_algoritms_SUITE --- lib/ssh/test/ssh_algorithms_SUITE.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/ssh/test/ssh_algorithms_SUITE.erl') diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl index bdc980e65c..90527cc8ed 100644 --- a/lib/ssh/test/ssh_algorithms_SUITE.erl +++ b/lib/ssh/test/ssh_algorithms_SUITE.erl @@ -365,7 +365,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) -> +start_pubkey_daemon(Opts0, Config) -> + Opts = [{auth_methods,"publickey"}|Opts0], {Pid, Host, Port} = ssh_test_lib:std_daemon1(Config, Opts), ct:log("started1 ~p:~p ~p",[Host,Port,Opts]), [{srvr_pid,Pid},{srvr_addr,{Host,Port}} | Config]. -- cgit v1.2.3 From f6f2e1dd44b8de44f9a6420ab9ca8b358674caee Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 14 Apr 2016 13:52:03 +0200 Subject: ssh: disable StrictHostKeyChecking in sshc_simple_exec test case The lack of this caused problems on some Windows machines --- lib/ssh/test/ssh_algorithms_SUITE.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/ssh/test/ssh_algorithms_SUITE.erl') diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl index 90527cc8ed..2e43399a5b 100644 --- a/lib/ssh/test/ssh_algorithms_SUITE.erl +++ b/lib/ssh/test/ssh_algorithms_SUITE.erl @@ -226,7 +226,9 @@ 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]), -- cgit v1.2.3 From 0977a597432d018ff0edb3895a32f78a08647b85 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 13 Apr 2016 12:44:27 +0200 Subject: ssh: adjusted timetrap values in ssh_to_openssh_SUITE --- lib/ssh/test/ssh_algorithms_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ssh/test/ssh_algorithms_SUITE.erl') diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl index 2e43399a5b..e6fc7662f9 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() ), -- cgit v1.2.3 From 223b123f576e726c18bcd38fa2b866d23f1a14a3 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Thu, 14 Apr 2016 10:28:04 +0200 Subject: ssh: breakout rcv_expected to ssh_test_lib.erl --- lib/ssh/test/ssh_algorithms_SUITE.erl | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'lib/ssh/test/ssh_algorithms_SUITE.erl') diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl index e6fc7662f9..3a8eec46a8 100644 --- a/lib/ssh/test/ssh_algorithms_SUITE.erl +++ b/lib/ssh/test/ssh_algorithms_SUITE.erl @@ -231,25 +231,10 @@ sshc_simple_exec(Config) -> " -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. + SshPort = open_port({spawn, Cmd}, [binary, stderr_to_stdout, + overlapped_io %only affects windows + ]), + ssh_test_lib:rcv_expected({data,<<"2\n">>}, SshPort, ?TIMEOUT). %%-------------------------------------------------------------------- %% Connect to the ssh server of the OS -- cgit v1.2.3 From 020e62c9619b518620d216cf0caef55fe129d4c3 Mon Sep 17 00:00:00 2001 From: Hans Nilsson Date: Wed, 13 Apr 2016 13:19:10 +0200 Subject: ssh: centralize and adjust port spawning for test_suites into ssh_test_lib --- lib/ssh/test/ssh_algorithms_SUITE.erl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/ssh/test/ssh_algorithms_SUITE.erl') diff --git a/lib/ssh/test/ssh_algorithms_SUITE.erl b/lib/ssh/test/ssh_algorithms_SUITE.erl index 3a8eec46a8..7965561c22 100644 --- a/lib/ssh/test/ssh_algorithms_SUITE.erl +++ b/lib/ssh/test/ssh_algorithms_SUITE.erl @@ -231,10 +231,8 @@ sshc_simple_exec(Config) -> " -o StrictHostKeyChecking=no", " ",Host," 1+1."]), ct:log("~p",[Cmd]), - SshPort = open_port({spawn, Cmd}, [binary, stderr_to_stdout, - overlapped_io %only affects windows - ]), - ssh_test_lib:rcv_expected({data,<<"2\n">>}, SshPort, ?TIMEOUT). + 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 -- cgit v1.2.3