diff options
author | Lars Thorsen <[email protected]> | 2016-06-15 13:18:21 +0200 |
---|---|---|
committer | Lars Thorsen <[email protected]> | 2016-06-17 07:51:01 +0200 |
commit | aee581679e2a61e819950e793d3977b340dec70b (patch) | |
tree | 227c0627090b5404dad1c04d34b3deb458c08803 /lib/orber/test/orber_firewall_ipv4_out_SUITE.erl | |
parent | d29526af250bb33a702556bb91cda136324b5b8c (diff) | |
download | otp-aee581679e2a61e819950e793d3977b340dec70b.tar.gz otp-aee581679e2a61e819950e793d3977b340dec70b.tar.bz2 otp-aee581679e2a61e819950e793d3977b340dec70b.zip |
[orber] Update the test suites to follow the new style
Diffstat (limited to 'lib/orber/test/orber_firewall_ipv4_out_SUITE.erl')
-rw-r--r-- | lib/orber/test/orber_firewall_ipv4_out_SUITE.erl | 43 |
1 files changed, 18 insertions, 25 deletions
diff --git a/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl b/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl index b1c8e00aba..e061d0410d 100644 --- a/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl +++ b/lib/orber/test/orber_firewall_ipv4_out_SUITE.erl @@ -30,7 +30,7 @@ -include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl"). -include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl"). --define(default_timeout, ?t:minutes(15)). +-define(default_timeout, test_server:minutes(15)). -define(match(ExpectedRes,Expr), fun() -> @@ -43,7 +43,7 @@ _ -> io:format("###### ERROR ERROR ######~nRESULT: ~p~n", [AcTuAlReS]), - ?line exit(AcTuAlReS) + exit(AcTuAlReS) end end()). @@ -87,12 +87,12 @@ cases() -> init_per_testcase(_Case, Config) -> - ?line Dog=test_server:timetrap(?default_timeout), + Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -113,8 +113,7 @@ end_per_suite(Config) -> %%----------------------------------------------------------------- %% Incomming connections - Deny %%----------------------------------------------------------------- -deny_port_api(doc) -> ["Deny Access due to invalid local port"]; -deny_port_api(suite) -> []; +%% Deny Access due to invalid local port deny_port_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -124,11 +123,10 @@ deny_port_api(_Config) -> ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, orber_test_lib:remote_apply(ClientNode, corba, string_to_object, ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"]; -deny_port_range_api(suite) -> []; +%% Deny Access due to invalid local port range deny_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -138,12 +136,11 @@ deny_port_range_api(_Config) -> ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, orber_test_lib:remote_apply(ClientNode, corba, string_to_object, ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -deny_host_api(doc) -> ["Deny Access due to invalid host"]; -deny_host_api(suite) -> []; +%% Deny Access due to invalid host deny_host_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ClientNode, _ClientHost} = @@ -153,14 +150,13 @@ deny_host_api(_Config) -> ?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}}, orber_test_lib:remote_apply(ClientNode, corba, string_to_object, ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. %%----------------------------------------------------------------- %% Incomming connections - Allow %%----------------------------------------------------------------- -allow_port_api(doc) -> ["Allow Access due to valid local port range"]; -allow_port_api(suite) -> []; +%% Allow Access due to valid local port range allow_port_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -173,11 +169,10 @@ allow_port_api(_Config) -> ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -allow_port_range_api(doc) -> ["Allow Access due to valid local port range"]; -allow_port_range_api(suite) -> []; +%% Allow Access due to valid local port range allow_port_range_api(_Config) -> [IP] = ?match([_], orber:host()), ServerPort = orber:iiop_port(), @@ -190,12 +185,11 @@ allow_port_range_api(_Config) -> ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -allow_host_api(doc) -> ["Allow Access due to valid host"]; -allow_host_api(suite) -> []; +%% Allow Access due to valid host allow_host_api(_Config) -> [IP] = ?match([_], orber:host()), {ok, ClientNode, _ClientHost} = @@ -208,11 +202,10 @@ allow_host_api(_Config) -> ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. -local_interface_api(doc) -> ["Allow Access due to valid host via a spcific interface"]; -local_interface_api(suite) -> []; +%% Allow Access due to valid host via a spcific interface local_interface_api(_Config) -> IP = orber_test_lib:get_host(), Loopback = orber_test_lib:get_loopback_interface(), @@ -231,6 +224,6 @@ local_interface_api(_Config) -> ["corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService"])), ?match(false, orber_test_lib:remote_apply(ClientNode, corba_object, not_existent, [IOR])), -% ?line catch orber_test_lib:destroy_node(ClientNode, timeout), +% catch orber_test_lib:destroy_node(ClientNode, timeout), ok. |