From 94cbd3390c7ee4e75062ba1b248cfd162235aec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Dimitrov?= Date: Thu, 1 Mar 2018 16:04:09 +0100 Subject: ftp: Fix property tests Change-Id: I72c564ea25d7cc41716229369459ae68d8706007 --- lib/ftp/test/ftp_property_test_SUITE.erl | 4 +++- lib/ftp/test/property_test/ftp_simple_client_server.erl | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'lib/ftp') diff --git a/lib/ftp/test/ftp_property_test_SUITE.erl b/lib/ftp/test/ftp_property_test_SUITE.erl index b314882296..46ed6959a8 100644 --- a/lib/ftp/test/ftp_property_test_SUITE.erl +++ b/lib/ftp/test/ftp_property_test_SUITE.erl @@ -41,9 +41,11 @@ all() -> [prop_ftp_case]. init_per_suite(Config) -> - inets:start(), + ftp:start(), ct_property_test:init_per_suite(Config). +end_per_suite(Config) -> + Config. %%%---- test case prop_ftp_case(Config) -> diff --git a/lib/ftp/test/property_test/ftp_simple_client_server.erl b/lib/ftp/test/property_test/ftp_simple_client_server.erl index c98d87b514..1bc54128f6 100644 --- a/lib/ftp/test/property_test/ftp_simple_client_server.erl +++ b/lib/ftp/test/property_test/ftp_simple_client_server.erl @@ -92,7 +92,7 @@ prop_ftp(DataDir, PrivDir) -> % io:format('**** _H=~p~n',[_H]), % io:format('**** Cmds=~p~n',[Cmds]), [cmnd_stop_server(X) || X <- S#state.servers], - [inets:stop(ftpc,X) || {ok,X} <- S#state.clients], + [ftp:stop_service(X) || {ok,X} <- S#state.clients], Result==ok end) ). @@ -263,7 +263,7 @@ cmnd_stop_server({ok,{_Host,Port,_Usr,_Pwd}}) -> cmnd_start_client({ok,{Host,Port,Usr,Pwd}}) -> ?fmt('Call cmnd_start_client(~p)...',[{Host,Port,Usr,Pwd}]), - case inets:start(ftpc, [{host,Host},{port,Port}]) of + case ftp:start_service([{host,Host},{port,Port}]) of {ok,Client} -> ?fmt("~p...",[{ok,Client}]), case ftp:user(Client, Usr, Pwd) of @@ -272,7 +272,7 @@ cmnd_start_client({ok,{Host,Port,Usr,Pwd}}) -> {ok,Client}; Other -> ?fmt("Other1=~p~n",[Other]), - inets:stop(ftpc,Client), Other + ftp:stop_service(Client), Other end; Other -> ?fmt("Other2=~p~n",[Other]), @@ -281,7 +281,7 @@ cmnd_start_client({ok,{Host,Port,Usr,Pwd}}) -> cmnd_stop_client({ok,Client}) -> ?fmt('Call cmnd_stop_client(~p)~n',[Client]), - inets:stop(ftpc, Client). %% -> ok | Other + ftp:stop_service(Client). %% -> ok | Other cmnd_delete({ok,Client}, {Name,_ExpectedValue}) -> ?fmt('Call cmnd_delete(~p, ~p)~n',[Client,Name]), -- cgit v1.2.3