aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2018-03-01 16:04:09 +0100
committerPéter Dimitrov <[email protected]>2018-03-28 10:19:38 +0200
commit94cbd3390c7ee4e75062ba1b248cfd162235aec6 (patch)
treeb4a2ea57b87dbdf175bbeded6ea7d23f2d69ee9e
parente0ee349fc426007c7b269660244aeda94ddadd9f (diff)
downloadotp-94cbd3390c7ee4e75062ba1b248cfd162235aec6.tar.gz
otp-94cbd3390c7ee4e75062ba1b248cfd162235aec6.tar.bz2
otp-94cbd3390c7ee4e75062ba1b248cfd162235aec6.zip
ftp: Fix property tests
Change-Id: I72c564ea25d7cc41716229369459ae68d8706007
-rw-r--r--lib/ftp/test/ftp_property_test_SUITE.erl4
-rw-r--r--lib/ftp/test/property_test/ftp_simple_client_server.erl8
2 files changed, 7 insertions, 5 deletions
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]),